Slavery is nothing like a contract. In a contract both parties must agree and enter it into willingly. And neither party has ownership over the other, and cannot do anything outside of that.contract or there are legal consequences for breach of contract.
Slavery is forced, and legally reinforced where it's been practiced.
Yes there are differences between slavery and regular employment for example which both parties agree to.
If someone sold themselves into service to a master because they were poor in Israel there was agreement on both sides and rules of treatment which were different for fellow Israelites than for foreign slaves.
Slavery does seem to have been more of an ownership thing in those days with the slave being seen as part of the person's source of income and of course with the responsibility and subsequent benefits of looking after the slave.
Women seem to have been treated differently and could be seen as enforced wives who came under similar regulations in treatment to protect the women from exploitation from the men,,,,,,,,,,,,,,but of course the whole thing seems to have been exploitation from our pov.
As I said the intent did not seem to be the transforming of society to the ultimate degree. God is more realistic than that.