Well, in the USSR from 1918 to 1920 they confiscated private gun ownership via various campaigns. They targeted kulaks in the early thirties and carried out mass executions of kulaks in the late '30s.
In Cuba they began confiscation almost immediately after the revolution and instituted programs to get rid of all arms from civilians in the mid 60s. Around the same time the government began religious and cultural persecutions.
Vietnam, almost immediately after the fall of Saigon began confiscating guns from civilians (despite these helping them win the civil war). After the confiscations they began securing absolute control over the south especially and began massive persecutions, re-education camps and forced collectivization, etc.
China was more gradual but there too they eliminated private gun ownership.
There certainly would have been more resistance and couterrevolutions and less repression if they had not confiscated firearms from the people.
If you have an armed militia made up of a subject class, and you have a ruling class they risk having to eliminate the whole of the subject class and having no one left to rule over. It would be like having an elite colony on Mars but no common people thus they become the common people. And being armed the militia made up of everyone who's not elite would put up fierce resistance. Most of the professional soldiers would defect. The elite would be unable to manage the armament not have the methods to deliver lethality. They can't just lob thermonuclear bombs as that would poison the very land they would live on and want to control. No, I think an armed militia is insurance against this scenario. We have witnessed authoritarian regimes who before they go on their repression campaigns do confiscate private firearms ownership from the population.