Whilst attractive to those who see the EU as only a sum of its parts, the notion that it is simply " nationalistic, xenophobic politics at a local level" that is to blame is worth further examination. The EU since the 1990s with the formation of Shengen , has made huge investments in managing migration both in programmes that assist resettlement and programmes that try and deter migrants coming in in the first place. As internal borders opened up security and control at external borders increased. This predates the ascension into of the EU of the eastern states many of whom do have the nationalistic xenophobic government that you mention.
The Integrated Border Management Fund, which is the most recent funding stream, didn't show any riffs between nationalistic, xenophobic politics at a local level and an enlightened EU leadership, nor did it split and party alignment it was backed by both the Socialist and Green groups.
According to the site Abolish Frontex " IBMF is the most important financial EU instrument to further expand Fortress Europe. It will lead to an increased militarisation of the external borders of the EU, which will result in more violence and pushbacks against people on the move and in pushing them to more dangerous migration routes to avoid this.".
According to the Dutch research and campaign group Stop Wapenhandel ( Stop the Arms Trade ) one of the drivers has been the military and security lobby that swarms around the EU , This lobby and the companies they represent has benefited not just from this latest tranche of 6.24 billion from theIBMF billions but previous tranches of dosh , but around around 4.5 billion euros from 2007 to 2020. Finicantiere , an Italian ship building company earned 120m euros , for example , building patrol boats for Greece and Malta . Lobbying groups like EOS ( European Organisation for Security) regularly meet with the European Cimmision and are part of advsiary groups . The EU's 100, 000 strong armed border army Frontex , recently expanded has its own budget for the purchase of equipment, consultants. There's a whole thriving industry built around biometrics, surveillance and IT systems right across Europe which is at the heart of the EU's direction. The French company Sopra Steria got a contract of 302 million Euros to roll out and maintain the biometric system, a Belgium consortium received 142 m for the Entry and Exit System .
Stop Wapenhandel also give a frightening example of two projects to set up fingerprint data bases of the whole population of Malawi and Senegal to identify illegal migrants from those countries in Europe. The projects received 23 and 28 million euros form EUTF . EUTF is European Union Emergency Trust Fund is funded by the EU and who state that their aim is "for stability and addressing root causes of irregular migration and displaced persons in Africa (EUTF for Africa) was created to address the root causes of instability, forced displacement and irregular migration and to contribute to better migration management."
My suspicion is that the EU isn't being held to hostage by xenophobic nationalist popular states , it's in fact the entire funding and principles that underpin the Shengen Area that makes Fortress Europe what it is.