This is not correct. The A318's final assembly is in XFW
and before delivery to the customer, and like with all the A32x assembled in Hamburg, the A318 gets a German test registration.
So yes, the A318 has been registered in Germany before, it's just that it hasn't operated revenue flights for German airlines so far.
Other airlines which so far have not been registered in Germany are mostly Russian built ones, at least not in West Germany, like the Yak-42 and the IL
-86/96. Some Russian built Airliners did get registered in the re-unified Germany for the short time Interflug still operated, mostly with a D-AOB* or a D-FO** like registration format. There were a handful IL
-62Ms that got German regs. One of those IL
-62s even operated for the Luftwaffe for a short period of time as a transport.