I have encountered "Infinite Time Loop" countless times. Some examples:
In Doctor Strange (2016) movie, Doctor Strange took the time dimension into the dark dimension to trap Dormammu into an infinite time loop.
In the last episode of season 5 of Doctor Who (2005) TV series, TARDIS saved River Song by trapping her inside an infinite time loop.
I remember Captain Archer trapped in an infinite time loop in the Star Trek: Enterprise TV series. They had found a capsule floating in space which was bigger inside and there was a fight over the capsule between advanced alien races.
I remember Silver Surfer encountering Adam Warlock trapped in infinite time loop in a 90s cartoon (possibly Silver Surfer Animated Series).
I remember Batman was having a deja vu experience while fighting with a villain in a 90s or 00s cartoon (possibly Justice League or Batman Animated Series or some other TV series). But, it was possibly not an infinite time loop. It might be that the villain was just turning back time.
Which Sci-Fi or Fantasy work introduced the idea of "Infinite Time Loop"?