Who said anything about dueling or lynching?
I've read thousands of pages of history on the old west, spent a lifetime traveling around in it, photographing it, and studying it. Next week I'll be in Wyoming doing the same. The fact is there was less crime and you were much safer in the old west than you were in any of the big eastern cities like New York and Boston, and much of the reason was as you state it, but also because being an asshole, or a crook, could get you killed because people were armed and justice was swift.
That applies to duels and lynchings, not so much to self-defense.

