The sword, as an effective weapon of war ended with the American Civil War and the perfection of Colt's revolver.
The sword was still a quite effective weapon of war where ever the enemy lacked revolvers or other repeating arms.
The history of warfare, both offensive and defensive is a constant series of innovation, and counters. Somethings last for long periods of time before an effective counter is developed, and sometimes only a very brief period of time.
And obsolete weaponry can still rule a battlefield when one side does not have its counter.
The advantage can be in equipment, or just in tactics, but it is real and effective when only one side has it and the other does not.
also, the Nazis did use revolvers, more than a few though they weren't first line issue. Small factoid, the gun taken from Hermann Goering when the Allies captured him was a S&W .38 revolver.
Hideki Tojo shot himself to prevent his capture, with a Colt .32acp. But the bullet didn't quite reach his heart. The US captured him, nursed him back to health over several months, then gave him a proper hanging.