Funfact: If you are working in the industry, you know that there are many companies who produce electronics in Europe in general and some even in Germany.
Bosch, Continental, Siemens, Palfinger, FAUN, Webasto, Phoenix Contact, Beckhoff, …
The problem is the gap between hobbyist project and hundred-thousand-unit production run.
You can't easily and cheaply get 10, 100, or 1000 units manufactured in the EU the way you can in China. This pretty much kills hardware startups and scaleups wanting to do local manufacturing.
If you're not a multinational or have an essentially-unlimited budget for your small-scale run, you have to outsource it to China.
As far as I am aware the European plants survive mostly on decent QA and regulated industries. When the cost of a defect slipping QA is high, it can be cheaper to operate European plant with intra-step quality controls than manufacture in China and slap thorough QA on top.
I'd add Infineon to that list, formerly Siemens.
Hitachi Energy as well, afaik anyway.
Fun fact: some of those companies are shutting down productions sites as we read this forum...