Didnt the Confederates really secede to safeguard the theory of white supremacy?
No. This is an argument by modern politicians who want to remold history to suit modern political agendas and to give their Northern ancestors a glorious but undeserved rectitude. In the 1860s, virtually all white people believed in white supremacy, North, South, East and West. Abraham Lincoln himself was a white supremacist and said so in public statements. The erroneous notion of white supremacy was not in doubt or in dispute at that point in history.