The Bible, the 10 Commandments for instance, endorses slavery. The 10th commandment says, that you should not covet your neighbors field or your neighbors ox, or your neighbors slaves. According to the 10th commandment, God has no problem with people owning slaves he just has a problem with people coveting the slaves of somebody else.
for - example - no self-correcting mechanism in religion - 10th commandment and slaves