Even historically Germany called immigrant workers "guest workers" because the expectation was that after spending 20 years in the country and building up our economy they would please go back to where they came from. This left most immigrants with one of two options: either full assimilation to the point of trying to out-German the Germans in order to fly under the radar, or sticking to their own entirely, resulting in what was first affectionally called "multiculturalism" and is now breathlessly reported on as "parallel societies". The middle ground, being integrated into Germany while maintaining some of their cultural identity was never seriously accepted as a valid option. Good luck if you also had the wrong skin color or eye shape or can't fake laugh about racist jokes about yourself.
And let's not get started on France's grandstanding about the Francophonique while shooing African immigrants into lawless slums to be neither seen nor heard until they get angry enough to set cars on fire and be beaten down by police again.
Europe's problems with immigration and refugees are entirely self-made. The handling of Ukranian refugees is evidence of this: as soon as Ukranians fled the war, European countries bent over backwards to lift all the sanctions that would normally apply to foreign refugees and treat them like EU citizens. Politicians would literally argue that it'd be inhumane to put Ukranian refugees into refugee shelters. And this had nothing to do with individual qualifications or skills.