First communism and socialism are hypothetical constructs which evolve into economic institutions. When they evolve they never take on the same shape as the neighboring comunist or socialist nations. But that isn't anything to do with disfellowshipping.
Shunning is thousands of years old and has been used in EVERY society in order to make sure the social arrangement doesn't change. Every group from family to tribe to nation used shunning. People needed to know that whoever they associated with would act or accept certain criteria. So shunning is cultural in its origins.
In the US religious shunning has always rested on a bed of barbed wire superstition ie., Witch burnings, drownings, etc.
Shunning for young women in Islam usually ends in death (murder by a brother or uncle) and is based on family honor.In northeast Africa Islamic honor is further purpatrated on young girls through female circumcision without which they might as well kill the girl because it besmerches family honor.
Shunning in the orthodox Jewish communities resembles the JW df'ing. And is the model for the WTS.
Shunning and df'ing are about fear of the unknown, ignorance and misogyny. If you become curious, educated and a humanitarian you will by process cease to adhere to the superstitious fears and becomne free. The controlling entity doesn't want this infection of knowledge to spread therefore spelling their demise. So kick out the smart people with real consciences. Its very immature but in the hands of adults very dangerous. Heck in the hands of kids its dangerous. Have you ever read "the lord of the flies"?
Politically this happened in the US during the McCarthy trials and blacklisting. The fear at that time was communist infiltration of America --poisoning the democratic republic population. The people were not smart enough to protect themselves so the government needed to legislate protection. The outcome? every specialist on the Soviets Union and communism became suspect. They lost their jobs. Eventually when France pulled out of Vietnam the US moved in without any background on the area or politics. No more east Asian specialists to advise Pres.Kennedy or Pres.Johnson. Just a bunch of hardline guys wanting to make sure the USSR didn't get this cold water port. and so on.
So, shunning always has negative ramifications. Shunning is ALWAYS done out of ignorance.