We use and abuse our military in many useless missions...all except for their first one which is to protect the United States. In this case our borders. We need to use our military to counteract the Mexican criminal smuggling cartels who use modern communication and military style tactics to bring illegals and drugs across.
It is not against posse comitatus to deploy our military on the border of this hostile invader nation Mexico
wikipedia
The Posse Comitatus Act is the United States federal law (18 U.S.C. § 1385, original at 20 Stat. 152) that was passed on June 18, 1878, after the end of Reconstruction and was updated in 1981. Its intent (in concert with the Insurrection Act of 1807) was to limit the powers of Federal government in using federal military personnel to enforce the state laws.
(immigration laws being Federal laws!!!)
Then there is Article 1 Section 10, which allows any governor to protect his borders from invasion if the feds can’t or won’t.
Any border governor could ask for volunteers to build fencing along their border. Fences are not rocket science. A double fence that is continuously watched is very effective.