Wanting to run a groundhog day/day after tomorrow campaign. Are there any known examples of campaigns that are similar I could use for inspiration?

I am thinking through a DnD 5E campaign based on the movies groundhog day and Edge of Tomorrow. The idea is that the players will exist in a loop of time, always waking up in the same moment and regardless of if they are alive or dead always resetting at the same time.

I have the narrative set out, and I am working on populating my region. I figure that with this kind of adventure I can fill my sandbox with a host of NPC’s who’s behaviour and actions every day can be stated unless/until the players do something to disrupt it. But I need to determine the game rules for this unique type of game. Things like Spell learning, gaining experience, repeating the same actions and the impact on DC. In my mind the players will reset every day with the same equipment so things like spell components etc an dhow I manage this.

In order to avoid this becoming a discussion I am looking for, either published examples of campaigns or adventures that have this kind of a story thread. DnD (any version) or another high fantasy system would be great, but if its a sci fi or other thematic system I can still look at how the rules are adapted to take account of the cyclical rather the linear nature of the story.

Alternatively I will also accept any first hand experience of running such an adventure and the rules you home brewed to deal with the issues you faced.