Slavery was the cancer that killed the Confederacy
Hardly. Had they remained in the Union, the slavery would have simply continued unabated.
What killed the Confederacy was the fact they were a real economic threat to the powerful interests then controlling Washington DC, and which still control it today.
They used their influence to get the government to destroy their economic competition before it damaged them severely.