Did Thomas Crapper invent the flushing toilet?
No — but he was a real person, a genuine sanitary engineer, and the coincidence of his name is one of the better accidents in the history of language. The story is wrong in almost every particular except that he existed.
What he actually did. Thomas Crapper was a Victorian plumber and businessman who ran a successful sanitary engineering firm in London, held several genuine patents — including improvements to the ballcock — promoted sanitary fittings through showrooms at a time when such things were not publicly displayed, and held royal warrants. He was a real and respectable figure in the trade, and his company's name appeared on manhole covers and cisterns, which is much of why people assume he invented what they were attached to.
Who actually invented the flushing toilet:
Sir John Harington, godson of Elizabeth I, described a flushing device in 1596. It was not widely adopted.
Alexander Cumming patented the crucial innovation in 1775 — the S-bend trap, which holds water and blocks sewer gas from entering the room. This is the genuine breakthrough: without it, indoor plumbing is unpleasant and dangerous.
Joseph Bramah improved the design substantially in 1778.
George Jennings brought public conveniences to prominence at the Great Exhibition.
Crapper was born in 1836, long after all of this.
The word, which is the interesting part. "Crap" is considerably older than Thomas Crapper — it derives from Middle English and older roots relating to residue or chaff, and appears in English long before he was born. So the word did not come from his name.
But the modern usage may have been reinforced by it. The commonly repeated account is that American servicemen stationed in Britain during the First World War saw his name on cisterns, and the association strengthened an existing word. That is plausible and not firmly documented, which is the appropriate level of confidence.
A genuine coincidence, then, rather than a myth invented wholesale.