Yes. When you are beat down and used up all your spells, the exact thing you need is a tough battle suddenly hitting you before you can rest. Nothing makes a game playable like assured death.
Random encounters belong in the overall world, not at camp which you don't access until you absolutely need it.
That's exactly what "ressources management" is about.
Will you fight the next goblins group in that dungeon or will you go back at camp right now because roads can also be dangerous ?
Yeah,that makes sense. Perhaps I will fight some goblins in the base, kililng them, and then come back the next day. Certainly the goblins didn't come across the dead bodies and will be all cool with the only people leaving during that period. Total immersion. I went to speak to someone who hadn't even heard from me - surely it wasn't the party.
The fights we are in now are not following the prescribed formula and are way too tough for a DnD game - you don't have random attacks at camp on top of that. If the encounters were balanced to the formula then being ambushed at camp could be doable - but it is not doable as the game is now.