"Double-edged sword", as a metaphor, has always been linked with "cuts both ways", meaning it can (figuratively) hurt both the person attacked and the attacker.
From 1793:
Mr. Burr (as was supposed) was too sore to be unbiassed ; he has,
therefore, delivered an opinion which, like a two-edged sword, cuts
both ways, for he declares that there was no sheriff, which, if
admitted, destroys the legality of the votes and casts an odium on the
Governor for suffering so important an office to be vacant.
From 1713:
This sort of argument is very unfair. It is also dangerous to to the
cause of those who introduce it. It is a sword which cuts both
ways. For we find the House of Commons has been more guilty than the
Lords in this respect.
The metaphor has never, for at least the past 300 years, been used in reference to a "real" sword fight, but always rather invoking the image of a blade that can do damage to the person wielding it, in addition to injuring the attacked party.
And it's interesting to note that, in the past 100 years, "cuts both ways" has attained a life of its own, becoming much more popular than "double-edged sword" and its kin.
Also note, however, that "two-edged sword" (which has always, up until 20 years ago, been more popular than "double-edged sword") achieved a high degree of popularity in the early 1800s, in a religious context that is apparently unrelated to the metaphor.