I think it would be more accurate to say that the racism replaces Lovecraftian horror, not that it plays the role of it.
I think you're incorrect.
Much of the point of the work is that looming dread of forces you cannot control is the same, whether it is a shoggoth breathing on the back of your neck, or a white supremacist law enforcement officer.
The horror of Lovecraftian horror is that everything on Earth is so inconsequential it doesn't even register on the evils radar.
Absolute and singular categorizations get in the way of understanding. There is not
one single "the horror" of Lovecraft. He employed many things which are horrifying.
The cosmic forces in Lovecraft do not view humans as consequential, or even as "people". Their efforts are irrelevant, and impersonally overlooked. The universe of Lovecraft is cold, uncaring or generally malign, holding no comfort for humans.
Now, consider the characters operating in a racist system -
the system is cold, uncaring and malign, and holds no comfort for them. It does not recognize the characters
as people. The overall racist system the characters operate under might as well be Azathoth.
However, the various minions on Earth that serve these impersonal forces have their own motivations, and may very well delight in your pain.
I think if you review some of
the various themes of Lovecraft's work, you'll find many of them present in the show.
Its a different scale than man's inhumanity to man, which manifests personally.
This show, in part, speaks to how
systemic and pervasive racism goes beyond the personal hatred of one person for another. Yes, sure, that individual man hates you, and is using the opportunity to vent his anger on you and show his or her personal power over you. But, when racism is so pervasive... that one person who has hatred ceases to be the real issue - if you killed that one racist... there's basically a limitless supply of others, and they are everywhere and you cannot really run from them. Those individuals are merely servants of the overall malign force.
In a way, it is our privilege that leaves us only thinking of this in personal terms. We can comprehend one person hating another. We cannot easily wrap our mind around
the entirety of society being malign to us. Much as a Lovecraft character cannot wrap their mind around Shub-Niggurath.
In Lovecraft, the actual elder god, the cosmic horror, is not typically personally witnessed by mortals. It is not
physically present for the characters to shoot at, or stick a sword into. It is a motivator that is elsewhere, in some space with geometry you cannot reasonably interact with. It might as well not actually have a physical form. So, how is "racism" not much the same as "Azathoth"? It is not a tangible object, but it is a motivator for events that unfold...