I don’t think death penalties need to edge into the ‘punishment’ definition (although I realize that’s a confusion of terms) to be worthwhile.
Making sure someone can’t endlessly throw themselves against monsters/die/repeat and eventually win is something we’d want to stop. To make the player take pause and realize they’re not going to get past them unless they straighten up and pay attention and play better, or take some extra measures to buff up, or simply come up with a different strategy, those are the types of death penalties that work. Those are the ones we like and that I’m talking about.
Taking gold away from people, or taking a full level of experience away, yeah, that’s a wake up call. It’s also the quickest way to get someone to uninstall the game. A very select few people will put up with something like that. It’s fine in Diablo II because gold has almost no use, but imagine if it did. You’d be encouraged through the mechanic to grind in easier areas where you’re sure you couldn’t die just so you could earn gold safely. That sounds terrible. Without a gold penalty you can play the content you want to play and meanwhile you’re finding items and amounts of gold that are relevant. That sounds like fun.