This has been done: surveying ~600 movements since 1900, researchers found those that used violence were successful about 25% of the time, while non-violent movements were successful over 40% of the time:
* https://www.goodreads.com/book/show/10056014-why-civil-resis...
Further: movements that used violence, and happened to be successful, also were much more likely to become authoritative themselves, while non-violent movements were more likely to be non-authoritative.
The recent historical record shows that you're better off not using guns, the exact opposite of your claim.
North Korea was quite capable of running a dictatorship since circa 1948. It seems from a quick read around that they brought in gun controls in 2009.
It sounds to me that it is perfectly possible to oppress a country with or without gin control.
The US in 2023 is the outlier in time and place.