I believe Django freed the slaves in the wagon at the mining company.
The doc may have been smart but usually the last man standing in a movie is the smartest or the most resourceful or whatever. And that was Django.
An illiterate slave (w/ a traumatic brain injury scar on his forehead, no less LOL) was able to cheat death numerous times, beat the system and accomplish his goal.
He learned to read, comport himself like a savvy businessman, shoot a rifle, shoot a pistol, rig dynamite. He figured out who he could trust and who he couldn't. He knew when to shoot and when not to. He was a penniless, shackled broken shell of a person in the opening scene and was sir lancelot at the end.
I don't know when I've seen so much growth!
(But yeah, he def had a bit of a 'tude. LOL)