Laws against murder don't "work" if you set the standard as being the prevention of all murders. Heck do away with all laws because they don't work.
It will work better than the empty air in the desert currently protecting nothing. The wall is one component. There will also be militarization, more troops and law enforcement until it is controlled and cartels are killed and runoff back down south. Drone strikes on meth superlabs. Clear and Present Danger stuff is coming.
And Mexico itself will absolutely be on board and help from their side. We have massive leverage over them. Obama didn't want to use it because he wanted those democratic voters in the country.