> Due to geography Swiss city states were able to maintain their independence and resist incorporation into larger principalities and subsequent empires
Swiss territory has been part of, variously, the Roman Empire, various Germanic kingdoms, the Carolingian Empire, the HRE and Napoleonic France. Swiss independence was really only enshrined at the Congress of Vienna, I believe at the courtesy of Metternich. Of Austria-Hungary.
> Swiss militia that defended this was the basis for the American 2nd ammendment
Source?
> the Swiss greater class homogeneity
Yes, Switzerland was universally poor and started becoming wealthy with less inequality than other nations in the 1920s. (Note that in the 1910s like 15% of Switzerland was foreign born.)
The homogeneity pitch just doesn’t work for Switzerland.