I think the gun/ammo aspect is just one part of the puzzle. As has been said, mindset, tactics, awareness, skill, etc., are all important. I practice getting quick, accurate hits on target, but that doesn't mean I ignore the effectiveness of my ammo choices. I choose effective ammo, knowing there's no guarantee they'll work. But, presuming I get good hits on target, those rounds will be more likely to stop an attacker than less effective ammo.
Of course, I do what I can to avoid being in such a scenario in the first place.
I also have contingency responses in case Plan A doesn't work.
One could say that self defense is all about balancing different probabilities. I prefer to hedge my bets whenever possible.