The story
Originally American English, from a literal use in cockfighting: a well-heeled cock was provided with sharp spurs and could inflict maximum damage. From this developed the American frontier slang sense of being well-equipped, and thence the modern sense of being well supplied with money.
Etymology from Wiktionary, CC BY-SA 4.0.