The character is traveling though a stereotypical hell (rocky, barren, hot, occasional river of lava) and they are smart enough to stay away from being captured by demons, but there are other people locked in cages etc.
I think I remember one scene where some demons are in some sort of a building with a waterwheel made of bones and, but the river is made of lava (or blood?) instead of water.
They spend so long subjectively in hell that they lose their memory and forgot who they are.
The twist (I think) is that hell is just a simulation, and the character manages to leave, but then for some reason has to decide to return.