I'm not sure if that would ever be possible.
Pretty sure it is, if you look into it enough.
Some games disable rollbacks, so you can probably set it to call a function when rollback is used too. With it you can activate a "detector".
And there are games with persistent files - I myself enjoy time loops, and that's basically what they are about.
But... that would probably require coding in actual python, and pretty sure Oni avoids doing much of it and jerry-rigs it through ren'py's internal code instead.
...anyone here suggests some time loop games from here, by the way?