The Polish company invoices the German company under the "reverse charge" regime. The German company treats the parts as if they were supplied by another Germany company, charging itself German VAT and refunding itself an equal amount of German VAT. There's nothing collected in Poland.