I’m not sure how not believing in a religious doctrine equates to believing in a dictatorship of the proletariat, but whatever.
I don’t either, but the Pope seems to think atheism was the driving force behind the Socialist and Communist revolutions.
While Marx, Stalin and Castro were atheists, so was Ayn Rand. Rand was just about the biggest supporter of capitalism you could find and she denounced all forms of socialism.