All this boils again to emotions - people see french teacher having head cut off by student due to showing muhammad's picture in the class, and this trumps 1000s other data points and discussions. I am not saying such things should be ignored or swept under the carpet, but analyzed rationally, discussed and good measures taken, even very harsh if they are the best course of action. Simple folks don't want to hear arguments, they want to see blood and whole world to fix their lives so they can live like some tiktokers they follow en masse.
For Europe, yet again Switzerland is doing stuff 1000x better than rest of the continent. They have 3x the immigration of average western EU country, yet 0.1% problems with it. But its population is smarter and less emotionally driven, so populists have it much harder here. Also they as society setup the whole immigration as set of rules as expectations that everybody +-adheres to. But EU has too big egos to actually admit somebody is better and just learn from more successful, so they will keep fucking things up till people are so pissed they will vote for people who will do further long term damage but will tackle scary immigration boogeyman.
Now its really not a good time for democracies that don't have well educated smart self-sufficient population, dictators are coming better off.
Well, being the continent's money vault and avoiding two world wars while the whole continent ravaged itself twice, tends to make a huge difference in your nation's development (time in the market beats timing the market and Switzerland did both).
Also, just like the USA, Switzerland won the geopolitical lottery early on by being in a position that's easy to defend and difficult to attack and capitalized on it over the decades by attracting the highly educated elite and the wealthy entrepreneurs escaping from the European countries as they were torn by wars and revolutions, plus the dirty money of warlords, dictators and criminals from all over the world made them incredibly prosperous. It's not a repeatable formula that any other EU country could have easily replicated.
Adding the fact that Switzerland is incredibly restrictive with who they accept in the country, compared to neighboring EU countries who just let the dross in to virtue signal how tolerant they are, maintains Switzerland a very safe and desirable place to be despite it being relatively diverse (diversity in this context also means diversity of thought and diversity of opinion, not just the US identity politics version of only meaning non straight white males). So another win for them.
But if you look at Swiss elections, plenty of candidates took the xenophobic route in their campaigns demonizing Muslims and burkas as the biggest threat, but unlike EU members they don't really care what other think of them so they're a lot more outspoken about it.[1][2]
[1] https://www.dw.com/en/anti-minaret-campaign-divides-switzerl...