Those must be chosen carefully, since i mostly rest when my party is out of spells and HP. A Random encounter that you cannot win would be counterproductive. Character resources should be filled up partly.
Giving us the possibility to hide or otherwise avoid the encounter by rolling ability dice could be an easy solution for being overwhelmed by a random encounter. It could also be a real use-case for SH's weird cleric subclass by aiding everyone to sneak/hide/lay low to avoid the encounter