"Protecting and defending the constitution against all enemies" is the perfect justificaiton for a coup d'etat. Which is why nearly all modern coups have used it as a pretext.
All it would take for the US military to become the perfect instrument of a military junta is for the rank and file to become reasonably convinced that the current government has run afoul of what they think the Constitution means.
Exactly.
The Spanish army rebellion of 1936 was motivated in substantial part by the belief that the Republican government was dominated by Communist and Socialist radicals who intended to establish a Soviet-style dictatorship.
This was not an unreasonable fear: in 1934, the Socialists made an armed rebellion against the Republic; the Socialist Party leader was praised as "the Spanish Lenin"; Communist orators asserted that the Revolution was imminent; the newly elected Left government created a new national police force staffed entirely by Reds (the Assault Guard); and the co-leader of the right wing in the parliament had been kidnapped and murdered by Socialist gunmen and Assault Guards.
For a comparable scenario in the U.S.: there would have to be a Presidential administration closely associated with violent radical groups, which appears to be moving toward an anti-constitutional "self-coup" (when a lawful head of government seizes dictatorial power).
The difficulty is that the President is normally elected by a majority, and it is unlikely the military would oppose the popular will. In 1936 Spain, the government was a parliamentary coalition of the "middle class left" with the Reds; the premier and then president was a "middle class left" figure who apparently could not see and never acknowledged the threat from the Red Left.
In the U.S.... suppose we have a President who is elected by a plurality, and who is the soft-headed tool of radicals in his party. They can gin up narrow majorities in Congress by dubious means. They use these majorities to stack the courts and regulatory commissions with a huge number of new appointees (by adding seats), and then start removing opposition officeholders by bogus prosecutions. They create a new National Police, with special "emergency" powers and a large quasi-military wing. When the opposition wins Congress in the mid-term elections, the President's group essentially ignore Congress and rule by executive decree, while organizing their followers for a possible seizure of power.
Under those conditions, one might see a military coup in the U.S.