Word or phrase for wanting someone to fail, but only for the lesson it will bring
You want them to learn something the hard way.
It means to learn something by an unpleasant experience.
once bitten, twice shy
Once hurt, one is doubly cautious in the future. This seemingly old observation, presumably alluding to an animal biting someone, was first recorded in 1894.
The American Heritage® Idioms Dictionary
Variations: once burned, twice shy (or wary or warned.)
The burned hand teaches best. After that, advice about fire goes to the heart (J.R.R. Tolkien)
The Two Towers: Being the Second Part of The Lord of the Rings