The issue with the Mexican and most Central American economies is graft and corruption at the Governmental level.
As if those things don't exist in the US....
Short of overthrowing those Governments - there's not a lot we can do other than what we've done (open markets - NAFTA).
Not even remotely true that we have done everything we can. Our relationships with countries to our south is anything but friendly or productive. A lot of those countries don't like us at all because our policies do nothing to help them.
Maybe we should try better border enforcement and encourage the local populace to institute change at home, rather than run away...
You can build the walls as high as you want and it WON'T MATTER. If there is money to be made they will keep coming. And frankly spending vast resources policing the border is hugely wasteful and will never solve the problem. They're ALREADY HERE in vast numbers. We have a far larger and less policed border with Canada and guess what? Canada is prosperous so there is no meaningful immigration problem. But the folks south of our border aren't white and don't speak English so we aren't so willing to help them.
As for encouraging the immigrants home countries to institute change is exactly what I suggested. You have to help them build their economies which in turn will spur changes. Right now the US trade policies are anything but helpful or friendly.