The village that gave English its word for total defeat has a gentle name. Etymonline glosses Waterloo as roughly "watery clearing." The second half is Flemish loo, a forest clearing or sacred wood, related to the English lea, a meadow.
On 18 June 1815, Napoleon's army was beaten outside that village, near Brussels. The place name soon became shorthand for a final, crushing loss.
Lord Byron was among the first to use it that way. In a letter to Thomas Moore from Venice in late 1816, he joked about "a Waterloo of an Alphabet." Etymonline dates the letter to 5 December 1816, while Word Histories gives 17 November. Either way, it came barely a year after the battle.
Americans took the word into politics. Word Histories, which searches old newspapers, finds "a Waterloo defeat" in the Nashville Whig in 1824, describing a New York election. In 1831 a Vermont paper, the North Star, said two candidates had "met with a Waterloo rout."
The verb phrase came next. A London paper, The Courier, printed a Paris report in December 1832 predicting that someone "would meet with a Waterloo in the interior." Philadelphia's Public Ledger had "meet their Waterloo" in January 1838 and "met his Waterloo" that December. By 1839 the phrase was turning up in Washington and Charleston papers.
So the newspaper record puts the phrase in circulation within about twenty years of the battle, on both sides of the Atlantic. It was not a late Victorian invention.
The idiom's sense has also drifted. Strictly, a Waterloo is a decisive and final defeat. In everyday use, people "meet their Waterloo" at an exam, a diet or a difficult boss, and the outcome is often less than fatal.
There is one more possible echo. Etymonline lists several theories for loo, the British word for a toilet, recorded from 1940. One of them is a pun on Waterloo. None of the theories has been proven, so the battle may or may not have reached the bathroom.