No amount of laws or redirection of migrants will stop somebody who is desperate , broke , and thinks El Paso or London or Athens is heaven on earth from coming to the first world.
I mean you got folks literally crossing oceans and seas in rubber inflatable boats. By now, pretty much everyone on earth has seen Titanic, so imagine the mindset of somebody who gets on a rubber raft , knowing damn well how dangerous it is, to come to the first world. Similar parallels exist for folks crossing jungles to get here.
In all seriousness the only fix to global migration is to invest in these places so locals don't need to leave. It's not even that hard. The issue is that all the global productive capacity is concentrated in the first world. We can undo that any time we feel like it. Think of how post war Japan or 90s Korea or 00s china was uplifted because the west exported their production to these places. We are doing something similar with Vietnam currently.
In practical terms, Literally moving a few Ford plants to El Salvador or opening an apple office in Damascus could double the gdp of these places. Now imagine if Europe and China joined in and spread Mercedes plants, nestle plants, or Alibaba tech offices
China's current global position is proof that you don't even need regime change to stabilize these countries. Just need economic opportunity from developed nations