Slavery was part of the ancient system of economy. The Bible focused on the redemption story, obedience, and righteousness.
Jesus' concept of freedom was deeper, John 8:
31 So Jesus said to the Jews who had believed him, “If you abide in my word, you are truly my disciples, 32and you will know the truth, and **the truth will set you free**.”
The Jews thought Jesus was talking about outward freedom.
33 They answered him, “We are offspring of Abraham and have never been enslaved to anyone. How is it that you say, ‘You will become free’?”
34 Jesus answered them, “Truly, truly, I say to you, everyone who practices sin is a slave to sin. 35 The slave does not remain in the house forever; the son remains forever. 36 So if the Son sets you free, you will be free indeed.
The opposite of freedom was not slavery but sin. Jesus focused on a deeper meaning of freedom. If a slave believed in Jesus, he was free indeed.
Further, I suspect that God would reward many of the slaves with eternal life while many of the ungenerous slave owners would be punished, Luke 16:
25 But Abraham replied, ‘Son, remember that in your lifetime you received your good things, while Lazarus received bad things, but now he is comforted here and you are in agony.
In the end, God is just when justice is considered from the eternal perspective.