No stupid rest restriction systems because they will end up doing more harm than good.
The proposed idea is not only complicated but also has a lot of fundamental problems.
What if the player is massacred by bad rng?
Then the only option is to load the game because it will not be able to continue the game. What if the player has only difficult fights that he cannot pass without rest?
The proposed system is very simple to soft lock.
The easy fix to this problem is to implement rest disincentives instead of rest limits. You are allowed to rest before X, but if you do your companions lose Y approval (possibly negated through a persuasion check) and/or a limited # of explicitly-noted-as-time-sensitive quests advance. Not auto-fail. Advance to a different state. E.g, if you've already activated the grove raid (a decision made by you), long resting means you arrive just as the goblins break through the gate, with some tiefling wall-defenders already killed.
This is why many people argue for random encounters, because they disincentivize but don't prevent long resting. "Sure you can go long rest, but you might have a random encounter which will be more tedious than anything, so why not push on for a bit longer?" But as noted, random encounters can add tediousness to the game, so other solutions (loss of companion approval) might be better.
Edit: I seriously debated adding the lines about quest timers because I know people will focus on that. But please read and respond to the spirit of my argument, not a single specific detail which is just one of multiple examples and of course is flexible.