Maybe...
This story might not be talking about the still-living Masakado.
But the Ghost Emperor Taira no Masakado who was resurrected during Lady Taki-Yasha's rebellion.
It's known that Masakado's resurrection might be connected to Kifune Myojin, who is the Dragon Snake God.
The fact that the Ghost Emperor's body is impervious to blades, bullets, fire, and water could very likely be the power granted by the Dragon God.
As for his weakness, it lies at the connection points where the missing right arm and head were separated.
This lore might have disseminated through streets and alleys during the Heian Period, gradually blending with Masakado's life story and evolving into the modern "Achilles' heel" tale we hear now.
The topic of Masakado's "body" was discussed for a while.
Kamiyagawa: "So, if Masakado's 'body' ends up under Kousei-ō's complete control, doesn't that mean the enemy we'll face will be an unbeatable 'Ghost of Ghosts'?"