They were not quite as personally repulsive as Donald Trump, but they also worked for a court, like the modern Supreme Court, stuffed with people of extremely low moral character, the majority of whom had participated or were active in slave trade/practice.
This is similar to having two sexual harassment figures, Clarence Thomas and Brett Kavanaugh decide that women's uteruses are chattel possessions of their disgusting purview.
The awful human being Franklin Pierce appointed John Campbell, who attempted, as a diplomat attached to the slaveholders rebellion, with Abraham Lincoln at City Point to end the Civil War. Lincoln graciously offered at that meeting that he wouldn't press to hang him for treason after the Confederacy fell.
Except for Peter Daniels, appointed by Martin Van Buren to the court, all of the seven justices who voted that Dred Scott was not a human being were either slaveholders themselves or had been appointed to the court by slaveholders.
One member of the court that declared that Dred Scott was not a human being was Samuel Nelson, a New Yorker, whose education was financed by his father who got the money by selling a human being that Samuel Nelson said was not a human being.
Dred Scott
The modern court has declared half of humanity, again with known sexual harassers on the court, has body parts that are government property, only slightly removed from Dred Scott.
Neither Buchanan - who corruptly conferred with the court on Dred Scott - nor Pierce, were narcissists, and neither were as personally corrupt as Trump, although both supported traitors to their country, but I think it's a difficult choice to establish which of them was in fact the worst.
Just my two cents.