Can you point to one where the court held that the Confederacy did not form a government? But I do agree, the courts are not infallible. The court, in a near unanimous opinion authored by a Yankee justice, held that segregation was legal. It did so based on an 1848 (IIRC) Massachusett law. The lone dissenter was Southern.
The courts have gave us legalized abortion, somehow discovering a right which eluded millions for almost 200 years. Today's court ruled 6-2 that a search is not a search when performed by a dog, and even the dissenters added clauses for bomb-sniffing dogs. I despise the thought of a living, evolving Constitution. If any change is necessary, amend it. In the past few days we have this same court refuse to hear a Florida case involving the Guarantee clause - a republican form of government is NOT one where the judiciary ignores the law.
Furthermore, the courts, state and federal, are not the ultimate arbiters of such decisions, they are penultimate. The federal courts are creatures of the people, and at all times amenable by them. Our founding fathers fought for the freedom to govern themselves, to free themselves from the clutches of tyrannical despots.
'They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety' - Benjamin Franklin
'If you love wealth more than liberty, the tranquility of servitude better than the animating contest of freedom, depart from us in peace. We ask not your counsel nor your arms. Crouch down and lick the hand that feeds you. May your chains rest lightly upon you and may posterity forget that you were our countrymen.' - Samuel Adams
Regarding a "Republic". See my tagline.
The fact is, the reason the South Seceded is they refused to abide by the rules of the Republic. They saw the writing on the wall. With every free state added the congress would become more and more against slavery and before long the South would lose its "peculiar institution". So, they tried to leave in order to preserve it.