I haven't played in a while... can you fast travel out of a danger zone? If not, that seems like the easiest solution for long rest spam. As the game progresses, have bigger and bigger danger zones where you can't fast travel or long rest. So you have to backtrack or keep going until you find a safe spot. As for backtracking, that's where "random" encounters would be useful (even if they aren't really completely random, to Ragnarok's point). Essentially, there would be certain areas where enemies might appear, even if you've cleared that area already. That would add a sense of danger to backtracking, which might require you to use stealth, invisibility, etc. to avoid combat if your party is in bad shape. It might not be the most elegant solution, but I don't see why they couldn't implement this with the current engine.