No, it didn't. The guerilla forces that were successful in Afghanistan has outside state sponsorship and supply and intervention by global or regional powers on their behalf (advisers, intelligence, special ops support, etc.) That's true of the Mujahideen fighting the USSR (backed by the USA, Pakistan, and others), and true of the Taliban/al-Qaeda associated groups which were fighting the internationally-recognized government (backed by Pakistan and Saudi Arabia.)
No, I think the pre-breakdown distribution of light civilian arms isn't how you win that fight.
Keep in mind the 25 million ex military in the US know how to run that gear. Any conflict in this country will be a mess.
Your SWAT example is great: how many guys are on the SWAT team kicking the door to get one guy? 4? 6? 10?
What about an actual military operation going door to door? Squad size is 10? 20?
Government violence, when directed against you is nearly impossible to resist. But that's not the same as government violence directed against an armed populace.
History is flush with examples of failures of superior military power to subdue a population that actively resists.
That’s just like the militia running around in the woods training just in case they have to fight against the government. The same government that spends billions on weapons every year. If the government wants to impose martial law - like the nutcases including Chuck Norris thought they wanted to do a few years ago - the “militia” wasn’t going to be able to stop them.