Out of curiosity, I googled one of your examples, Spain, to see for myself how effective it has been.
https://www.cbc.ca/news/world/migrants-spain-melilla-morocco-europe-1.4835930
The fence is monitored 24/7 with infrared cameras, motion sensors and watchtowers that make it possible to respond to a breach within a minute.
That's pretty involved. Probably not feasible for a border of our size so it'll be interesting to see how effective a smaller border is at stopping people from coming over.
More than 4,700 in Ceuta and Melilla have jumped the fence from Morocco so far this year (as of September 2018)
D'oh.