No need to take the wall money, border security is a valid Military mission, as are anti-terrorism and counter-narcotics.
Increasing Military engagement with the problems on our Southern Border, has been steadily progressing throughout the Trump Administration.
In addition to a program to temporarily (going on two years now) deploy Military personnel to the border, in support of DHS, there also seems to be developing the kind of deliberate, long-term Military tasking that you propose. Great minds think alike.
Troops have been hardening Ports of Entry and emplacing hundreds of miles of concertina, as well as providing logistics support and pulling shifts monitoring screens in command centers, to free up badged officers for Law Enforcement.
But significantly, they have also been bringing Military surveillance assets to bear on the border. Not just a few ground-based sensors, but actually a (very) significant reinforcement of Predator Drone flights, that seems to be structured as a standing capability, rather than a temporary deployment - at a string of bases along the border, as you proposed.
NORTHCOM currently maintains situational awareness of North American Aerospace and Maritime borders, through their subordinate command, NORAD. NORTHCOM also operates Joint Task Force (JTF) North, which provides standing command and control for Military support to Homeland Security.
They have the ability (and likely now the mission) to apply available Military assets (including possibly satellite capabilities) to maintain a real time situational awareness of the Southern land border as well, and to share that capability with DHS. The net result would be dramatically improved detection and tracking across the entirety of the Southern Border.