God hasn't advocated slavery. He advocates Eden. Any problems are of Human origin. God works around that.
Eden? As an ideal to be achieved, or as some state of aboriginal perfection from which we have descended? I take it that you don't think the story of Adam and Eve is literally true, but if not, then presumably you think there was some kind of Golden Age? If so, when?
However, even suggesting Eden at all and trying to link it with the unfolding of the Biblical texts creates quite a few problems. The story seems to have been incorporated very late into the canon - most of the prophets don't refer to it at all, apart from a few references in early genealogies. So little importance is given to it that it doesn't get any further significant reference until Ecclesiasticus in the Apocrypha - and there Eve gets all the blame.
Christ made one reference to the Eden story*, when opposing divorce. Thereafter, it's all down to St Paul who really bigged it up.
However, if you choose to read the Old Testament entirely within the context of humans falling short of an aboriginal perfection, as if the ancient Hebrews were perfectly aware of their transgressions, you have further problems. There were five Old Testament covenants (The Adamic, the Noachic, the Abrahamic, the Mosaic and the Davidic) and not only do these contradict each other, there is not too much evidence that the
original compilers of each were all that aware of the existence of the others.
Therefore, I'd suggest that the laws concerning slavery in Exodus etc were not perfectly reasonable pragmatic injunctions promoted by God to help the ancient Hebrews on their path back to divine righteousness, but simply entirely human edicts issued by a priestly class intent on consolidating a beleagured people in a hostile region.
*Or perhaps not at all - he may have simply been referring to the Priestly account in Genesis 1.