What I'd thought was that they could have built a raised monorail. No barrier to it, just regular concrete pylons supporting it above the terrain (smoothing out its gradient, ensuring no flood-barrier action) with two or more tracks for bidirectiontand train units above of up to three types (nominally indistinguishable). Patrol carriages (equipped to deliver/retrieve border patrols via waystations and/or hoists), carriages to supply mass-transportation across the southern parts of the southern states (at least, but for now start with spur-tracks to near-border locations deemed worthy of the service as well as serving all significant border settlements) and similar carriages to support northern Mexican territory, likewise.
By border cooperation, Mexico would probably gladly pay towards a system that is useful to Mexico itself. The (bilateral) border-patrol will ensure the physical non-mixing of transport between the two so that they only board/alight in the same territory (except by arranged licence, maybe later even a fourth class of train with Eurostar-like boarding checks. The trackbed would support sensors to monitor covert crossings, or any climbing onto the track (no need, except for if you want to get on the track, which is generally a prohibited thing in railways/railroads anyway and indicates more than merely illegal crossing, except perhaps where the border-track provides an impromptu bridge across an actual river, which can be specifically guarded against) and as a monument of engineering it would be more impressive a feat than just dumb and (barely) single-purpose concrete/steel barrier.
Over time, the utility of the track may extend far from the border (both ways), making for a national (and, where allowed, transnational) infrastructure system. As far as its role in cross-border migration is concerned, combined with a reasonable reception protocol (unlike the current shitshow, where they're discouraging most forms of 'honest' attempts at migration and thus creating a bigger market for your surrepticious border crossings, with desperate families and more malicious migrants are so easily mixed together) there's easy and sympathetic movement of asylum-seekers away from pinch-points and thus less overloading of the system.
For fairness and security's sake, the rolling-stock would be identical (barring the patrol versions, perhaps with a few gimmicks to them, like.low, medium and high-security accomodation for suitably-assessed 'guests' of the border patrol) and cycled across between the two (later, more?) nationstates upon each major service, allowing any deliberately concealed packages of drugs or guns or other illicit contraband to be uncovered, and ensuring no unavoidable apartheid of repairedness.
Not that it'd happen, but just imagine