In the Star Trek: Deep Space Nine episode "Hard Time," Miles O'Brien is captured by an alien species and falsely convicted of a crime. A trailer for that episode is embedded above.
Normally, Starfleet would be able to spring him free within a few days and O'Brien would be able to get back to his normal life. But this species, the Argrathi, didn't imprison people for years at a time. They just artificially induced in prisoners the memories of long imprisonment. Chronologically, O'Brien went in and out of prison in a few hours. But inwardly, he experienced 20 years of confinement in a lonely, dirty cell.
The experience psychologically broke O'Brien (until, of course, the next episode).
Rebecca Roache, a philosopher at Oxford, has explored ways in which current and future technologies could be used to make enhance the punishments of prisoners. Ross Andersen of Aeon magazine interviewed Roache about her work.
First, why would you want to do such a thing? Roache argues that certain people deserve more punishment that can often be experienced in a single lifetime. For example, if the Allies had captured Adolf Hitler before he was able to commit suicide, could confining the 56-year old war criminal for the rest of his life constitute a proper punishment? Roache envisions an alternative approach for the worst criminals:
When I began researching this topic, I was thinking a lot about Daniel Pelka, a four-year-old boy who was starved and beaten to death [in 2012] by his mother and stepfather here in the UK. I had wondered whether the best way to achieve justice in cases like that was to prolong death as long as possible. Some crimes are so bad they require a really long period of punishment, and a lot of people seem to get out of that punishment by dying. And so I thought, why not make prison sentences for particularly odious criminals worse by extending their lives?
We are entering an age of expanded human lifespans. Some people argue that practical human immortality--or at least the defeat of aging--is coming soon. When a person is sentenced to life in prison without the possibility of parole, then in the future, it could mean centuries of confinement.
Speaking more speculatively, Roache moves into Star Trek territory. If you could alter prisoners' perception of time, could you move their sentences along more efficiently?
There are a number of psychoactive drugs that distort people’s sense of time, so you could imagine developing a pill or a liquid that made someone feel like they were serving a 1,000-year sentence. Of course, there is a widely held view that any amount of tinkering with a person’s brain is unacceptably invasive. But you might not need to interfere with the brain directly. There is a long history of using the prison environment itself to affect prisoners’ subjective experience. During the Spanish Civil War [in the 1930s] there was actually a prison where modern art was used to make the environment aesthetically unpleasant. Also, prison cells themselves have been designed to make them more claustrophobic, and some prison beds are specifically made to be uncomfortable.
There's obviously a lot of potential for abuse here. A state empowered to deliberately extend the lives of prisoners or psychologically confuse them in order to extend their suffering is essentially empowered to engage in torture as a means of punishment.
-via Marginal Revolution
Going down the slope into greyer applications, it could also be used for various forms of conditioning that ranged from beneficial -- controlling the urge to overeat, redirecting dietary choices, breaking a tobacco habit, etc. -- to all the different forms of indoctrination to a social or political cause, or to an organization.
The Inner Light, a Hugo Award winning ST:TNG episode, dealt with a different use of this sort of tech. It was a way for a culture to share its history through one member's lifespan.