This is a great point. But as you allude, unless American citizens will not punish politicians with ‘no reelection’ in response to support for a return to porous borders and M visas — not Green Cards — for short-term work by Mexicans, a return to less porous borders seems highly unlikely.
A priori and until implemented and latent issues materialize, it would seem less porous borders, M-visas (six months of work, with a six-month wait from timing of return to Mexico for a new application perhaps), turning back of those caught, and goings back and forth by Mexican migrants might be better solutions than walls, more enforcement, and detentions.