So let's say we have a game in which (on average) 4-6 characters go adventuring and, over the course of the day, their resources are whittled down.
Sometimes (actually quite often) those resources are asymmetrically depleted for one character. This creates a strong incentive for the group as a whole to stop and replenish, decreasing their chances of failing any given challenge and--more importantly--keeping the player of said character engaged rather than on the sidelines.
How do you solve that problem for all groups in a way that doesn't make any one type of character obligatory?
This is an interesting question, so I though I'd give my answer to it.
Let's say there are 4 primary Classes that focus on 4 primary types of Class Challenges. Also, the Abilities for each of these Class are generally limited Per Rest. Some abilities take more or less time to replenish, some don't replenish, and some just decline with fatigue like swinging your axe continuously. These Rest periods are traditionally every 24 hours with penalties accruing if you don't take them. Characters could even potentially exhaust every bit of themselves, if they go without a rest long enough.
As long as the players can choose when to engage and when to avoid challenges, (or at least
try to in either case) then they can adventure to their current abilities and resource strengths.
If some, but not all players chooses to use up all or almost all their replenishable resources, then the whole group can seek to avoid the Class Challenges those characters are suited for.
The group doesn't need to stop adventuring or seek a safe place to Rest. They only need to assess their current strengths and weaknesses and adventure as desired. Heck, they could even choose to continue to face challenges to which they aren't currently well suited for.
If there is more than one character of a given class, then the depleted character can serve as support in those Class Challenge - just like anyone else who isn't of the class for the current situation. This offers the opportunity to still shine for those players who saved their strengths from previous challenges.
There is a drop off point where the group as a whole is weak, but possibly one or a few characters are still relatively strong with daily resources. Seeking a place to Rest may be the group's decision, but it should also be possible for the strong characters to split off, if so desired, to seek their own ends. Without the whole team those folks will be significantly less capable, the whole being more than the sum of its parts, but they could still be effective enough to accomplish some goal or gain some treasure.
Lastly, if you play a group of characters where everyone is of the same Class, then the whole group has opted to focus on those particular Class challenges. That's great. That's all dessert all the time as the other food groups aren't what they're looking for. Of course, those challenges will still exist in the world and could be sought met or sought, but the current characters are ill-suited to them. It's not as if a creature of any Class could not partake in another class's challenges. It's just they aren't as adept with their own class's abilities to face these other kinds of challenges. Of course, when faced with unusual challenges folks tend to get creative with what abilities they have, which can lead to some interesting outcomes as well.
A band of halfling thieves is better off avoiding combat with a trio of trolls unless those thieves are seriously high level. However, they could set some traps, hide in tree branches, set off a loud distraction, sneak up and then steal the trolls treasure without too much fuss. If they're spotted, they are probably dinner, if the halflings decide to match up in melee. But they do stand a decent chance of getting away, if they focus on hiding and sneaking out of sight when pursued. If they get creative with their Thief abilities, they might even think of a way to trap the trolls and easily combat them from a safe distance.