Civilians were always better armed than the average military in the past up till 1956 when the full auto M-14 accepted by the military.
The military was always one step behind.
When the army had flintlock smoothbores, civilians had rifles.
When the army accepted a flintlock rifle the civilians were using percussion cap rifles.
When the Army accepted the percussion cap rifle, civilians were using breach loader rifles.
When the military accepted a breach loading single shot rifle, civilians were using high cap lever action rifles.
When the military accepted their first bolt action rifle, civilians were using lever, slide, semi-auto, bolt action rifles, and experimenting with full auto rifles.
I wouldn't say that rifles were better per se than muskets, but for different applications -- speaking in terms of the American Revolution at least. Rifles look longer to load and could not take a bayonet, making riflemen extremely vulnerable, so riflemen were often paired with musket-armed light infantry for protection (with the Kentucky long rifle the load has to be whacked down the first part of the way with a starter, but the shorter, heavy Jaeger rifle used by the German mercenaries needs a mallet to hammer the load into the barrel -- not very practical). George Washington had a distaste for riflemen, and wanted to limit their numbers in the Continental army to no more than two regiments (pretty sure it's two). At the battle of Lexington and Concord, the number of colonists carrying rifles was probably close to, if not, zero -- many of them had rifles of course, but when going to fight they grabbed their muskets.
One for one the rifle is far more accurate, but from a strategic point of view it has some serious trade-offs.
Not to mention the incredible difference in medical care available. Any torso wound pre-20th century was a death sentence, and it would often be a slow agonizing death.
Now shooting victims survive most of the time. Relative to the medical care, the old muzzle loaders were much more deadly than today’s firearms.