The great wall of China works also
More seriously now, both the Czech Republic and Romania have been looking at the Hungarian approach. Their wall has been extremely effective.
That said, to play devil's advocate, I'm not sure a wall in the US would work as well. Mexico is another story. Mexico is building a wall, which will work much like the Hungarian wall. People aren't seeking to move to Mexico, just like Hungary, but travel through Mexico to the US, like Hungary to Germany.
The biggest problem for the three (3) nations is when Germany started incarcerating illegal immigrants (yes, that's the official, EU term) that did not obtain refugee status. At point during its peak, nearly 1M were interned, as their jails had overflowed (yes, they do put them in jails in Germany).
Given both the Czechs and Romanians continue to sue the EU and Germany, and the EU courts have been at the mercy of Germany (who has their own, fiscal mess to deal with over this), they are considering the Hungarian route. It's a rather sad tale that is not told in the US, as the 3 nations saw 3x as many undocumented residents (to use the US PC term) as Germany itself.
No one likes to talk about this. One thing the wall in Hungary did was completely cut the head off organized crime growth. That's what every CBP, DEA, DHS and ICE agent I know have been talking about.
I.e., they could care less about the immigration debate, but organized crime has exploded ... with mom'n pop operations springing up over the last 6 years because it's now a market valuing at tens of billions of dollars per year.
E.g., even the Obama administration admitted as such by 2013, that earlier policies had only hurt everyone.
Again, just like cops on guns, people ignore them and listen to the US media. I prefer to talk to actual agents that deal with it first hand. They hate seeing the atrocities. They know how to make things better. They know where the real issues are.
And they are much better now, in 2018, than they were in 2013, or even just 2016.
Just like the kid on the cover of Time magazine, his mom had $6,000 to pay organized crime. Those who don't end up running drugs, guns or humans on their backs as 'payment.' The exploding market is scary, and agents should know.