“The Military is legally prohibited from enforcing domestic laws, under the Posse Comitatus Act.”
—
Then how did Eisenhower get away with it?
The National Guard can also be used.
.
“Then how did Eisenhower get away with it?”
There is an explicit exception in the Posse Comitatus Act for suppressing insurrection/civil unrest. Many Presidents, including Eisenhower, have used the military under this exception during rioting, and after natural disasters to control looting.
“The National Guard can also be used.”
The National Guard, while under State control (not Federalized), is exempt from Posse Comitatus. They can be (and have been in the past) deputized by State Governors with law enforcement authorities like arrest powers. When not Federalized however, only limited/constrained Federal funding can be made available, so large/long activations are not a financial option to the States. There might be some ways around this, but it has been an obstacle in the past.
There are exceptions built into law, that have not yet been fully invoked, to use the Military specifically for border control.
Ultimately however, the use of the military could not correct the problem, if they are bound by the same self-defeating catch and release laws that bind the Border Patrol. If the laws were corrected, the Military would not be needed. There would predictably be aggressive legal pushback by the Left to exercising those untested Military powers at the border, which might result in those powers being lost. In fact, some of that authority is now being used in the current Military support deployment to the border - partly to firmly establish the legal precedent.