I think that Trump's back is against the wall. He's struggling to get this wall done in order to maintain his base for 2020. But in the meantime, investigations that are just ramping up on his finances, family and other shady transactions are just starting to become a real thing for him. He absolutely has to win re-election in 2020, there's just no other way for him to avoid indictments once he leaves office. The only other thing he could do, if he's desperate enough, is to pull off a military coup. He can try to just simply overthrow the government and unconstitutionally seize power. He's threatened it in a veiled way in the rhetoric he stated today.
Pentagon chiefs and field commanders would never act to destroy democracy.
The high command would act only to restore democracy.
Trump saying the military supports him is more bluster out of his ass. Trump's support among the rank and file is approximately the same as his support base in the general society. It's more or less, by each service, as online polls demonstrate by Military Times to name one prominent private publication consumed by armed forces personnel at home and globally. Trump doesn't get to 50% support in any branch of military service, with Marines giving the highest support and Navy the least support (along with AF). Officers across the armed services give much less support to Trump than enlisted do, to include nco enlisted.
Among the top commanders at Pentagon and in the field, Trump's support shrinks to a tiny number. Indeed, of the 80+ retired generals and admirals of one star to four stars who endorsed Trump during the campaign, only a dozen or so continue to speak up for Trump while the mass of 'em have gone silent.
It's anyway the case that a coup d'etat in the United States is an enormous and complicated undertaking that's never been done here, nor is there any model of it abroad that is suitable to the USA. There are 50 states each with its own governors, legislatures, judiciary, National Guard, police forces, firefighting forces, county and municipal governments, very many of which have military bases of the service branches. These civilian factor forces could help or hinder a coup depending on who orders it and why, and for what purpose.
Joint Chiefs would necessarily be the commanders of a coup given they sit together at Pentagon and each chief is chief of his branch of service. The current chairman Marine Gen. Joe Dunford is not reliable to either side and would tend to oppose any action either way. If Trump wanted a coup he'd have to bypass Dunford. If the joint chiefs wanted one they'd have to do the same. For Trump that would be a problem as the chiefs would fall in behind Dunford to do nothing. If the chiefs wanted a coup to restore lost democracy it wouldn't be a problem either as the incoming chairman, Army chief of staff Mark Milley runs the joint chiefs anyway and he's the guy the JCS would fall in behind automatically to restore lost democracy.
A coup in USA is so enormous and complicated an undertaking that it would need to be limited to the Washington DC metro area and region and certain key cities and armed forces installations in USA. Decisive to it is the US Northern Command which is at Peterson AFB in Colorado. The three star general or 3-star admiral who commands Northern Command leads all five armed services in the defense of the continental USA. Whoever might initiate a coup would need his cooperation, or his acceptance, or his leadership. This is the vial command to execute the coup. JCS can design a coup but they'd need to order a commander to execute it, and that would be the Lt.-Gen or Vice Adm. in charge of Northern Command. It's anyway the case that one of the JCS could insert himself in command of NC, from Pentagon.
The troops at the southern border come from U.S. Northern Command. NC has been withdrawing small numbers of the troops and sending 'em back to their bases in the US, thus reducing the number of bored and agitated troops that had been assigned since back before the election. When Trump got wind of the incremental but consistent withdrawals he went berzerk. So Pentagon grabbed 2500 troops from NC 5th Army to replace the drawn down troops of 5th Army. Pentagon sent mostly fresh troops who hadn't been deployed to begin with to avoid problems of morale and discipline among the troops who'd spent months at the southern border bored and aggravated. When I was stationed at Ft. Myer Virginia next to the Pentagon, the infantry regiment I was in is part of 5th Army Group. Fifth Army is the main force of the Northern Command. NC has a couple of Marine Infantry regiments; NC also has considerable air forces and some navy.