You have delved into a topic few fear to trend. A lot of Medium political writers just assume the military won't obey Trump's orders.
From your references, it seems to me the laws are vague and complex. Both sides of a legal dispute can effectively argue their case, and with the current Supreme Court being the arbitrator, the decision is likely to go to Mr. Trump's favor.
But letting the courts decide may take too long. I may be wrong about this, but I believe the President can appoint the generals. If so, what's to say he keeps firing generals until he gets his patsy in place? Then when the "crisis" comes, he can just move forward.
And then there is the definition of "insurrection." There's already a big part of the population who believe the insurrection has already occurred and must be routed out. Surely there must be military people who think the same way.
While I believe the Harris victory is certain, the aftermath after Tuesday is not certain.