The way I would solve "save scumming to avoid random encounters on rest" is this: The roll for the NEXT rest's random encounter happens right after you rest. You have no idea whether or not there will be a random encounter next time, until you actually rest. And when you do, it's too late to save scum it, since the roll already happened long ago.