There were, IIRC, very different rules for Hebrew slaves and for goyim. Hebrew slaves were treated a lot better.
My great-great-grandfather wrote a catechism "Especially for the Instruction of Coloured Persons," with lots of Bible verses, New Testament included, explaining how those persons should submit to their masters and wait for their reward in heaven.