IT IS IN THE FUCKING CONSTITUTION, DUDE. READ IT. Oh, let’s just ignore that we have a 1st Amendment (or 2d Amendment, if that floats your boat more), and fuck the 4th and 5th Amendment too, since the Rehnquist court forward has fucked them both so hard. The 14th Amendment was broadly written to keep insurrectionists from gaining power. The court CAN be involved, to consider challenges to an election official’s act or lack of action. But no court is initially involved.
And if a democrat was an insurrectionist, they SHOULD be prevented from taking office. And if a fuckhead election official decides to call a Dem an insurrectionist for no reason at all? Their act would be subject to judicial scrutiny.