Hi Feedy. Welcome back.
I think the relationship between slavery and racism is much more nuanced than you're allowing for. There was a quite a debate around it from the 1950s onwards. You can certainly have racism without slavery and slavery without racism. But if you accept a definition of racism as being one of identifying a group of people because they are an "other" (other culture, other skin colour, other community etc) I think the link is stronger than you're allowing for.