I am looking for a word or phrase for wanting someone to fail, but only to teach them a lesson.
It's not easy to explain. For example, when you tell a child, "Don't run down the hill or you will fall," but they continue anyway. To prevent them from doing this in the future on a bigger hill with a much more harsh outcome, you want them to fall so the lesson can be learned.