I’m not sure if this is the origin of “Be careful of what you wish for,” but the idea of a wish-granting totem that twists your desires into something terrible is really a lesson in specificity. In the story, a man wishes for money, and gets it in the form of compensation for his son’s death. Brutal.
Making a wish that prevents you from suffering some ironic tragedy really requires you to think deeply, get very specific about the conditions, and also verbalize what your boundaries are.
If you think you could make a wish that would prevent disaster, why don’t you get that specific with your goals? At least those might actually happen.