Another problem is one that plagues all old world countries - societies are based around ethnicity.
These combine to mean that Germany and the EU in general are not attracting the best from abroad. The region is often the second or third choice of the educated migrant. Don’t believe me - look at the EU’s own internal migration numbers and the stats for immigrants from outside the EU. Internal EU migration is pretty low relative to countries like US (states vs countries, sure) and the immigrations from outside are largely poorly educated.
This shows in Germany’s immigration policy - they have been reducing barriers to entry for over a decade now and are yet struggling to hire foreign talent. This begs the question - why?