I feel like one thing we, as designers of persistent environments, could do a better job at, and that would help to make people more amenable to setbacks and challenges, is to stop thinking so much in binaries of 'success/failure' and more in a series of meaningful choices that each open up different avenues of play. We set up games to have one "success state" - it's not an immutable condition of the universe, it's a design choice.
For example, if we're going to use literary/story conventions (which, if I'm honest, I don't think are a very good match for RPGs, because the story isn't entirely in the hands of any one author, and may be in the hands of a random statistical element, so expecting things to turn out as smoothly as they do in media is setting oneself up for frustration, I feel) then failures in a story are rarely ever just FAILURES. A good author doesn't slam a barrier down in front of the protagonist without creating a path to get around, under, or over the wall - usually a more interesting and dramatic path than just going straight through the obstacle would have been.
I've been playing around with the idea of, essentially, there being continuums of play which are interesting but mutually exclusive - you can dabble in each, but to commit to one, you have to damage your reputation with the other - although that reputation can later be repaired if you decide it's more fun to play the other side. Like, instead of "Here's the dominant power structure - if you screw up with them, you're SOL when it comes to play," instead thinking of it more like, "Here's the overt group of power-brokers, here's their shadowy counter-points. Pissing off the overt group is going to shut you out of some of their opportunities, but it's also going to make you attractive to the shadowy counterparts, who will open up opportunities for you that you can only get by "failing" to impress the overt group."
Basically, the designer needs to think: If I'm putting out this challenge which can be failed, what are the consequences of that? If the consequences aren't inherently fatal, then how do those consequences allow players to continue to advance their character's desires by other, but still fun, means?
That said - some people can't accept consequences of any sort, so some people are always going to cry "my story" or "my agency" whenever things don't work out exactly as they have planned. You can't design around these people, you can only gently shoo them to other games that work better for their needs, before they cause too much trouble.