There always seems to be a way out though, which I personally actually dislike about the game.
Whenever something happens that could kill them, it won't unless you do a specific thing again like trying to fix electronics again after getting a shock, or staying in the extreme version of an emotional state.
Personally I don't like that because then it goes from accidental deaths to me as the player making them dead and I don't want to do that either. I just like the random chance it could happen.
I haven't had trouble yet with changing the emotions to prevent death, even from the wishing well I had eight sims pick make a wish with the hooded face there and all eight survived, making different wishes with the worst possible outcome.