Illegal contracts are unenforceable. Claiming that indentured servitude and peonage aren't really slavery because of contract is the sort of sophistry our courts reject.
I am curious as to why you think it's better that someone who reneges on a contract be imprisoned if they refuse to make good, than for the person the contract was made with to enforce it, as agreed. Imprisonment is a cost to everyone and of benefit to no one, unless the one being imprisoned has harmed someone and is likely to harm others.