
When I came back with a new campaign I explicitly stated that character death is an option, advising them to have a couple of characters handy. Sure enough, a character died in the very first (random) encounter. In my current campaign, one player has had characters die not once, but twice. Usually character death is the result of the player's and party's actions, like being the first in the room with the troll and having the next person fall and cause a pile up outside the door. Or being 15 feet behind the thief when they blow the disarm check and the portcullis drops. And once, unfortunately, I goofed and forgot to provide the right clues that this is was encounter to run from.(Feel bad about that one.)
Instead of worrying about Encounter Balance and calculating CRs for every encounter, I just try come up with encounters that challenge the players to think and role play, providing clues for them to misinterpret or ignore. As long as we're having fun, encounter balance isn't important.