At best the 2nd amendment will just lead to another brutal civil war as the weapons are turned away from the government and to the people on the ‘wrong side’. Like the average Joe would ever stand a chance against a militarised police force anyway.
Philosophically pure, maybe, but philosophy needs to be messy if it aims to cover edge cases. Otherwise, too much is open to interpretation.
The county I am in (Ghana), had a spree of military dictators for over 30 years but the military didn’t go on a killing spree. Guns are available and the military had the weakest amount of influence in the countryside where many farmers had weapons.
Having the half the population armed with handguns would have been a huge restraint on the army since they wouldn’t have been able to operate safely in cities either.
While it’s true that it wouldn’t stop indiscriminate genocide committed by the government, most counties are factional and the military is made of people who have relatives in the general pop.
It's work keeping in mind that the amendment was written when the military and civilians had the same "hardware": muskets and cannons. In those times, protecting against a tyrannical government was entirely feasible with a large enough group. In fact, that's exactly what the USA did ~350 years ago. Granted, they had help from places like France, but they still did it.
Also, do you remember what just happened in afghanistan?
Philosophically, I guess, but in actuality it's completely pointless.
If the state is taken over by a tyrannical dictator and the military themselves are complicit (don't attempt a coup/rebel against it) then someone owning a handgun is going to be scant resistance.