"Be good at our game or we'll make it less fun for you" should not be a design mantra. That's why I dislike the harsh death penalty in the latest Zelda game, A Link Between Worlds, that ultimately sees you having to re-tread vast portions of the game to re-try what it was that beat you in the first place. Ultimately the penalty for death is time - fail and you lose 20 minutes. This is harsh indeed, not to mention tedious. This poses an interesting design question though - how do you create a meaningfully harsh death mechanic that doesn't take away from player enjoyment?
Many indie games have harsher death mechanics, but quick restarts and shallow gameplay mean you are dropped back into the game doing exactly what you were doing before you died. Super Hexagon or Hotline Miami for example. The other archetype is the game that challenges you to get to its end. FTL or Hoplite both do this - death is harsh, you have to restart the game, but games don't last long, so again, this is not so punishing, in fact it's a formula that has existed since the advent of the arcade cabinet. As long as the game is consistently fun, then the repetition is not tedious and death is not too punishing. The real trick is implementing a good death mechanic in a longer, story-based game.
So here's a proposal - one possible answer lies in your absence from the world. When you die, the world keeps running rather than resetting and the penalty comes from not being there to help. This would work well if, for example, you have squadmates who die permanently, or in multiplayer - We don't specifically punish you by docking your score or character progression, or by making you repeat a section, in fact you're technically getting a second try, but things escalate more while you're away so it's a scramble to get back into the action, and if done right this should be fun rather than a chore. The penalty is not what happens to you, but what happens to everything else while you're gone, and if you design the game right this all just happens naturally and in an emergent way. All you have to do is create systems that fight each other or tick over without you.
I recently managed to add this concept to a game relatively late in its development - although it's not always possible to make changes to the core game later in the process, we compensated by placing elements in the world that the enemy tries to attack. When they're destroyed they're gone for good - die and you're re-spotted away from them leaving them vulnerable until you return. This is an imperfect solution, but it did add a nice meta-game for the more advanced players - can you complete the game with all of these elements in-tact? It had a nice knock-on effect of letting better players choose a more challenging game.