So, I have been a DM for over twenty years. My actions in game are responsible for the character deaths of more PCs than I can remember. In truth, even more deaths are due to the actions of the PCs themselves, not my machinations. I had a party implode over the palming of a single ring (which was actually cursed) and they were only third level. That campaign lasted all of three weeks. I had a first level character encounter green slime while scouting ahead and did not recognize it for what it was, so I tried to give hints that something was drastically wrong by declaring that he hears sizzling coming from his boots. Instead of turning back, he chose to go forward toward the door at the end of the hall, which turned out to be a false door (bonus points if you know the 1E module this came from). The slime ate him, no evidence was left. I had another player tear his character sheet in half after an unfortunate fall into a vat of acid that he personally survived, but ate almost all of his magical possessions (he was a mage). The result was straight from the book and combined with his dice rolls. He never returned. I am not above retconning a mistake on my part and have done so repeatedly. For example, in Rappan Athuk, the first time I ran the module, I failed to prepare properly and the first level badass creature encountered the party. Well, I did not completely read the entry to notice that they had 0 chance of defeating the creature so gave no such hints that their characters were in mortal danger, until someone threw a spell at it and I read the SR followed by the DR entry. This was after one of the PCs had already become stuck to a pseudopod that slammed him. I allowed the guy to escape and they ran away (which was the ONLY way to defeat the badass). It mattered not because they never made it out and I have been unable to convince another party to enter the halls of the Dungeon of Graves since.
Do I sleep well at night? Yes, absolutely. If it is my mistake, I fixed it. If the characters die because of their choices, well, it is a game after all and someone just lost. Fortunately, there is a reset button of sorts and new characters can join at anytime (something I became very good at, introductions). It did bother me when in party fighting or real life damaged the group. In hind sight and with the experience of age, I have come to learn that not every member of a group can be salvaged. Sometimes, a party member will need to leave for the betterment of the group. If you think feeling bad about a poor decision or a bad die roll sucks, try asking someone to leave your house and never return. That took me a while to get over.
I am not even going to talk about what I did to the gnome sharpshooter (splatbook, the one and only time I allowed it) or the elven archer (from 2E). Those two are probably responsible for the survival of their groups. At least in those cases the problem was mostly with the players and not the rules, or rather the players inability to completely read their rules and abused my trust that they did...anyway...I do have a confession:
Dave Cornwell, your flying PC in the late 90s did have the ability to kill the dragon I was desperately trying to save. His last minute dive to avoid your spell was a plot device to save him for later, not a saving throw. It was my fault for not remembering your Wings of Flying. I had not realized anyone even possessed the ability to go after him, let alone bring him down! My belated congratulations and a thank you for handling it so well at the time.