I believe Soviet control over areas such as Azerbaidzhan & Afghanistan help show a small picture of what would initially happen to religion while under Communism, let alone Socialism. According to The Handbook of Major Soviet Nationalities, Islam simply withered away & also witnessed the gradual erosion of traditional Islamic life:
"Azerbaidzhan presents two cultural worlds: one urban in which Islam and its traditional customs, art, and literature have largely died; the other rural and isolated in which women still wear black shawls and Moslem values have more than historical significance. But, in sum, Islam lingers on more as a source of tradition than as an actively worshipped religion. While such Moslem customs persist as circumcision, religious proverbs, naming of children with Allah's attributes, and early marriage for women, the five pillars of faith are no longer observed. Zakat [alms] is forbidden, public prayer is quite rare, Ramadan (month of fasting) conflicts with work schedules and is effectively discouraged, and Hajj is limited to a handful of token pilgrims allowed to visit Mecca."
According to an old New York Times article, it reported:
"Western and other foreign specialists here are skeptical of a theory widely circulated in the West that the Soviet Military intervention in Afghanistan was motivated largely by fear that a spread of Islamic fundamentalism through Central Asia might infect the adjacent Soviet Moslem peoples.
"Diplomats and journalists who have traveled recently in the Moslem republics of Soviet Central Asia and the Caucasus report that religion has been eroded in the lives of the 40 million or so people of Moslem tradition. ...
"The Soviet authorities seem to feel complete confidence now in the loyalty of their Moslem peoples, ... Moscow's confidence appears to be illustrated by reports from Afghanistan that many of the soldiers sent for the intervention are Tadzhiks or others of Moslem tradition.
"The atmosphere is even more secular in Central Asia than in Moslem areas of the Caucasus. The mosques, minarets and mausoleums of ancient glory are state museums now, tourist attractions. The small and humble mosques open for worship are sparsely attended by the elderly. Young people are seldom seen there."
(New York Times, 13 January 1980, p. A:14, and 12 April 1980, pp. 1, 6.)