China built a wall to keep people out. It worked. Because it was defended by over-watch positions of mobile troops.
East Germany built a wall to keep people from escaping to freedom. It failed. Because it looked inward instead of outward.
Why do we have "firewalls" on our computers? To keep bad actors out.
An American Wall, by itself will do no good, but with proper observation and with highly mobile manpower, it will not only deter, but defend our southern border.