You might want to understand for yourself that the Declaration of Independence makes no moral judgements about slave holding states wanting Independence from Unions.
If it worked for the 13 slave holding colonies against the United Kingdom, which was over 1,000 years old, why would it not be valid for a very young country that was only "four score and seven" years old?