Harg Harfardarssen
Cipher
The punishment isn't the encounter, it's that you don't complete your rest and have some additional resource depletion. So resting is a risk in that you may have even fewer resources than when you started (Just don't give xp for the encounter.)
Well, that's a different system. In a game like BG2, there's no additional resources that are used up (unless you're typically chugging potions and firing scrolls for every random encounter, but again, that'd mean more resources used up resting at 25% than 75%).
If instead you're talking about a system where resources are consumed upon rest (like in PoE, but not in BG2) and the random encounter is used to waste one of these, you're talking about a system where you're just upping the cost of the resource a bit (so if it cost you 100 GP to rest 4 times normally, with 1/4 chance of a random encounter it now costs 100 GP to rest 3 times). But instead of just upping the price, you're adding a bunch of repetitive trash encounters. And repetitive trash encounters is one of those complaints about PoE that people then completely ignore outside of PoE, even suggesting adding more of them in "solutions" like this.
By resources, I mean ability uses more than consumables. Basically vancian spell slots or MP or whatever. The kinds of things that are replenished on rest for zero marginal cost. So as long as the encounters are non-trash enough to burn enough of those slots/mp that the random encounter is a net loss, it is a disincentive to rest.
Whether it is enough of a disincentive depends on making that encounter hard enough. If resting is only safe when you are at 75%, well...mission accomplished. If a player wants to neurotically rest every time they hit 75% and ruin the game for themselves that's their problem. The idea is just to shift the needle so constant resting is not a risk free, easy-peasy solution. Otherwise you feel like you are playing non-optimally by not resting all the time.
In other words, it's not a zero sum game where people will either never rest or rest every encounter, it's a continuum and if you push it so that resource marshaling across more encounters is encouraged the game will be better for it.
Although, I think rests in dungeons outside of scripted encounters are stupid, so I guess my favored solution is to just disable resting in dungeons.