If you have a bad thing happen to you because you did something wrong, that is something you can fix. You can strive to not do that again. You can learn from your mistakes. You can analyze what you did wrong so you don't repeat it going forward.
One of the most powerful ways you can encourage your children to become successful, happy and contributing people is to teach them good decision-making, and then allow them to make their own decisions.