The protagonist is a famous escape artist who enters voluntarily in a prison-escape challenge with the designer of an 'escape-proof' prison. The prison is just a machine hooked up to the mind of the prisoner and causes the victim to experience 10 years of paralysis in 10 minutes of real time, thereby alleviating the cost to society of incarcerating criminals while also being more humane. The protagonist is initially trapped inside his own dreamscape but eventually is able to perceive the inside of his own mind and his traumatic experiences as blobs of color, process them and become healed. He overcomes the paralysis but instead of completing the assigned task that would end the challenge he grabs his nemesis and brings him into the simulation, showing him the 'prison' he created has far more value as a tool of psychotherapy than it ever could as punishment. I believe I might have read it in IASFM, Analog or Galaxy. Does anyone recognize this story?