Alas, though, investment rates average just 12 percent of G.D.P. in Guatemala, Honduras and El Salvador, while in Mexico it’s 26 percent.

Yes, both legal and illegal immigrants actually contribute, on balance, to American growth, but there is no question that border security, asylum courts, resettlement and absorption facilities put pressure on federal, state and local governments. But …

The U.S. could spend millions of dollars to help stabilize Central American countries — so that more of their citizens could stay home, which most immigrants prefer — and we’d still save money and reduce illegal immigration. It costs us anywhere from $14,000 to $38,000 to detain and deport a single migrant.

Finally, we also need fences, drones and sensors to strengthen the border in places. But rather than building a $5.7 billion wall against Mexico, what we need most is to help Mexico improve its capacity to intercept migrants at its southern border with Guatemala — where all Central American migrants headed north have to pass. It’s not that hard. There are only two main roads out of Guatemala to the north, with a mountain in the middle. It’s called Mexico’s “Tehuantepec isthmus bottleneck.”

If we worked with Mexico to create better entry-point infrastructure there with biometric controls and improved ability to inspect vehicles, people and merchandise to stop smugglers — and even interview potential asylum seekers there — we would significantly reduce the numbers coming out of Central America, crossing Mexico and piling up at our border.

In sum, we need a plan that creates a wall, not a wall that substitutes for a plan. That’s what a real president would offer. If only we had one.

But have no illusions: More weak nation-states will be imploding under these pressures in the coming decade and no empire is going to impose order there; those days are long gone. But many of these states simply cannot effectively govern themselves any longer. (Heck, Britain can’t effectively govern itself any longer!)

So how the world of order collaborates to bring order to more and more of these places — Italy has basically created and funded the Libyan Coast Guard to protect itself from migrants crossing the Mediterranean — is going to become one of the biggest governing challenges of this century.

The Times is committed to publishinga diversity of letters to the editor. We’d like to hear what you think about this or any of our articles. Here are sometips. And here’s our email:[email protected].

Follow The New York Times Opinion section onFacebook,Twitter (@NYTopinion) andInstagram.