Those walls did indeed work, for centurys the Great wall of China made getting into China without paying your tarriff difficult , not impossible of course , but difficult is worth doing.
If the Great Wall of China had been built to enforce tariffs, you might have a point. But it was built to keep out invading armies. It failed.
Hadrians wall was built to keep some ancestors of mine out of the Romans hair it worked pretty well.
Hadrian's Wall worked as a massive military garrison along the border of the Roman Empire on the island of Great Britain. Do you think we need a military garrison of 10,000 troops or more along our southern border?
Hadrians wall was well situated and well built , yes I would not mind haveing a lot of soldiers stationed near the border.
The Great Wall of China was built over several generations , it ultimately was overcome but for the few centurys it was effective , it was effective.
The border fence wouldn't need to be there if the Illeagal immagrants were not pressing in willi -nilly.
The Demand for their labor is very strong , if they were not sneaking in and offering themselves at a steep discount , businesses and individuals would be seeking them out at their homes and offering incentives for them to come, includeing travel pay.
Perhaps a Labor Union would be a good alternative to the Wall?
If Mexican labor was disaplined and organised , they could come to the border and make demands about conditions before thay woould deign to cross it.