Two in one. I know many Jews in the Islamic world were slave merchants, particularly in Andalusia and North Africa, though they were prohibited to enslave Muslims by the Islamic governments and prohibited to enslave Jews by other Jews. I think in Italy Jews were allowed to own and sell Muslim and pagan slaves, but not Christian ones but am not sure
I'm drawing a blank on whether Christian Arabs/Christians in Islamic countries/empires were allowed to own slaves, i know Christian Arabs weren't allowed to own or ride horses.
And, i am sure, Christians in Christian countries were allowed to own slaves until prohibitions of slavery began at various points in history, some popes tried banning it a early as the 1100s (banning Christians from owning Christians), and Muslims were sort of banned from owning Muslims. In all cases laws were infrequently applied, re and mis interpreted, and sometimes slavery would be prohibited for a time and re-legalized.
The Janissaires were Muslims and slaves of the Caliph at the same time, and black Africans were permitted to be enslaved by European governments whether they were Christian or not.
I think in Italy Jews were allowed to own and sell Muslim and pagan slaves, but not Christian ones but am not sure
your timeline is huge but a similar thing definitely happens in reconquista spain: Jews could not own Christian slaves by the time of James I of Aragon. prohibiting out groups from enslaving your religion is a pretty common sense move based on the logic of intra group relations in a world without religious tolerance.