No, what it would do is remove for the most part the incentive that draws them here.
Even if they went back to trying to mail cash all cash can be tracked today through RFID tech and it would then be easy to detect cash being mailed to addresses outside of the US.
If the border is secured to a high degree you can also catch people trying to move money out of the country physically through the legal ports of entry.
There’s nothing we can do that cuts off every avenue in and out of the country for people and contraband but what we can do is make it so expensive and difficult that we reduce the flood to a trickle.
This would also force Mexico, Central, and S. America to deal with their own problems, especially their economic problems.
Remittances, primarily from the US now exceeds their total petroleum production as the largest part of their economy. If we could only cut that by half Mexico would have to make dramatic changes to their economy and to protect their own interests would be forced to get serious about cutting off the flow of illegals from their southern border as well to protect them from economic collapse.
It would also force the countries to their south to either clean up their own acts or face violent revolution as people who can no longer flee are forced to stay and fight to make their countries more like the US.