That’s not true the military are required to do something if a foreign country tries to take over which is what China did.
The military are required to respond to a foreign invasion, not to interfere in domestic elections, whether they are compromised by illegalities or not.