No, the "whole foundation" of Marxism is "from each according to his ability, to each according to his need". The topic of religion is quite peripheral to the central ideology. Did Mao and Stalin take Marx's offhand opinion on religion and turn it into an era of brutal religious repression? Certainly. Could they have skipped that entire campaign and still been communists? Absolutely. Jesus himself was a communist.
I would disagree w/ you there. The foundation of Marxism is class warfare, without it there is no Marxism.
The catchy slogan that Marx used in the critique of the Gotha Program was used to summarize life in an ideal communist society - a society where there is no labor anymore.
But in order to get to that society Marx was very blunt about his distaste and distrust of the church. The only people Marx trusted w/ the revolution were the workers, everyone else, remember, was a "class enemy," especially the church, whom he saw as merchants of a false ideology and a kind of slavery. Stalin and Mao took their ques from Lenin, who went on an open rampage against religion.
Atheism wasn't peripheral for Marxist-Leninists, it was central to their ideology and worldview. They saw themselves as atheists and saw it their duty to indoctrinate the world in their worldview; the systematic destruction of church's and clergy was not a peripheral act that they could have done without, but religion threatened the foundations of Marxism, and it was a dedicated systematic eradication in the USSR, just as in China, North Korea, Vietnam, and Cuba.
This is why the official belief of the state was proclaimed atheism.
Don't want to start a long debate here, but I do want people to remember what happened there, and the millions of Christians persecuted.
And yes, I guess you were talking about communism w/ a small c. Saying Jesus was a communist is a pretty big leap.