That's actually reassuring, in a way. Thanks for the detailed response.
I have a question: Does your passport have a number?
Just wondering. Thanks for the cool info.
Yes it does (and this is required by international agreement). The number contains an identifier for the issuing authority (and its name is also printed on the passport) so they know where to look for info if they need to.
There is neither an EU-wide database of citizens, nor of permanent residents. They do have a database of most issued short-term Schengen visa nowadays (VIS) but even that took a lot of effort to implement.
And as said, at the moment they can't even verify all electronic signatures in electronic passports but that should be fixed soon.
I'm not even sure how they would create such a database of citizens as even not the German government has a conclusive list of all citizens and I presume it's similar in other member states.
That check for the right-of-entry is done with the presented document alone. Revocations are checked against and while it's possible to forge the documents it's not easy. But yes, there are known cases of people successfully entering with forged documents.