I dont think atheism was the thing that made communist regiems so murderous, I'm pretty sure it was the communism that made them so psychotic and that even if they were religious they would still murder a whole lot of people.
The thing is, part of what enables communism/socialism, is the cultural and moral vacuum left by atheism.
There have been Christian groups that tried socialism, and some still try, socialism. It tends to result in economic failure, but not genocide and other forms of mass-murder. In these contexts,
human institutions are still subordinate to God's Law.
In an
atheistic communist social set up, the
state is god in the abstract, and the
head of state is god in practicality. You did what Stalin said, or you died. You did what Mao said, or you died. Their word was law, their proclamations carried the weight of
moral law.
Yes, there have been 'christian' dictators. So-called 'christian' kings who did horrible things to their people and other peoples. There's a long history of corruption within the clergy of any long-existing church, particularly the catholic church because of how long it's been, and how much secular authority has at times rested in its hands.
This still ran into cultural conflict with the fact that these horrible leaders and rulers were directly violating the moral law that was nominally dominant within their culture, and they still were not a
patch on what happened under atheistic&communist regimes in the 20th century.
It is
no mistake that atheist communists make religious orders one of their prime targets, because as long as the culture is to any meaningful degree defined by a religion, the communist religion of 'state-worship' cannot reign supreme.
Nietzsche himself predicted that the 20th century would become the bloodiest century in human history. He did it after communism had started to arise, and after atheism had started to arise. He did
not predict it would be because of communism, he predicted it would because of 'the death of god,' and he was
exactly right.
Communism/socialism when subordinate to Christianity, is a recipe for economic failure and suffering such things generally don't last long, because they aren't really compatible as culture/government combo, one of the two will be forced out by the other. When combined with atheism, it is a recipe for... I'm not sure if there's a
single 20th century tyrannical regime that butchered a million or more people that
wasn't born from the combination of communism and atheism.