In Stephen King's collection of short stories "Everything is Eventual", he posits the idea of a never ending Déjá Vu as Hell.
In Disenchantment, the writers also have the idea of eternal punishment as an endless loop replaying the worst moments of the poor wretch's lives forever.
This would seem to be a common idea much older than either one of those; which author or director was the first to suggest the idea?