Perhaps preventing the party from long resting while in a dungeon, cave or building (or anything alike, just not outside in the wild) would discourage people from resting after each encounter. Especially since there's no indoors/dungeon version of the camp location - it suggests the party does go outside to camp and head back inside once they're done.

Yes, people would still be able to move out of the dungeon to the surface to rest and head back in to the dungeon immediately after. I think it would at least discourage them to do so in larger areas. Perhaps they will now do 2-3 fights and use short rests in between before going to bed.

Another thing to disuade people from long rest spamming is giving players a slight buff or reward for only resting after a certain number of fights or with some decent playtime in between. Some sort of "well rested" bonus which you can only get after X amount of battles, quest progress, time played, ....
This could be some temporary hit points, slight XP boost, one re-roll of a d20, the 'aid' or 'bless' spell effect for a little while after resting, ... just some random ideas.