You make several excellent points, although I think that there is a lot more nuance that should be explored on this topic.
When I was working on my B.S. in nursing, I had to write a paper on racism . . . where I decided to argue the following points:
Pease consider that humans were hunter-gatherers for several hundred thousand years before we developed agriculture, and there was (and is, although in a different way) competition over food, territory, shelter, and so forth.
We might feel guilty about taking the nieghboring tribe’s food away from them and allowing them to starve, so in order to assauge this guilt, we need to dehumanize them.
In order to dehumanize them, we need to see their differences as defining characteristics, so things like skin color, hair texture, and facial anatomy are obvious choices.
So . . . I believe that racism is a holdover from when we were hunter-gatherers that had to compete for resources.
To support this idea, please consider the Uncanny Valley phenomena that was discovered by Silicon Valley computer experts who were working on robots (although Isaac Asimov seems to have predicted the Uncanny Valley several decades before it was actually discovered when he theorized [in his science fiction] about a “Frankenstein Complex” attached to robots).
Please see below:
https://www.google.com/url?sa=t&source=web&rct=j&opi=89978449&url=https://spectrum.ieee.org/what-is-the-uncanny-valley&ved=2ahUKEwic4Z6qtIuUAxUogGoFHUnjNyAQFnoFCKABEAE&usg=AOvVaw1HSD3RNFiDadWyoWuvS_aJ
https://www.google.com/url?sa=t&source=web&rct=j&opi=89978449&url=https://www.telefonica.com/en/communication-room/blog/frankenstein-complex/&ved=2ahUKEwiF1P6YuIuUAxU6nCYFHc_dO1kQFnoECEYQAQ&usg=AOvVaw3l1rZ8LyQRUXUMqcxsmUbW
If any of these points seem to suggest that I am justifying racism because it’s “natural” or–somehow–justifiable because it’s built into our genes, then please think again.
It was entirely natural for our caveman ancestors to engage in cannibalism, subjugate women, and live to the ripe old age of forty.
Also, flying in airplanes, talking on radios, and doing brain surgery to remove tumors are also unnatural, so if we argue that racism is natural and should be embraced, then we should also give up airplanes, space travel, modern medicine, etc. to avoid being hypocritical . . . which also means that about 75% of humanity would die without modern agricultural science, and never mind the death toll from giving up modern medicine.
And these points demonstrate that racism is hypocritical . . . which isn’t Earth-shattering, as racism and hypocrasy always seem to dovetail neatly together, both back in the Pleistocene and now.
P.S. Please note that I added slight changes to this post after the fact to correct minor grammer and stylistic errors.