Right, but you know that you have it and what kind of stamp you expect... and since everyone should check the stamp before (!) leaving the counter... well... and so on... 😁
A passport in Germany is not a proof of residency, because there is no address in it. I know that you can have your complete address in your passport in your country. As a proof of residency we use the ID-Card... or the Passport together with a "certificate of residency". Since he doesn't have a valid residency in Germany he can't apply for this certificate.
That might be correct in other countries but in Germany you must have residency. If you don't have it you can't apply at any Thai Embassy or Consulate in Germany.