You guys are thinking too organic, I think. Here's my thoughts on robot prison as a computer scientist.
We already know that AI in robot jail are deprived of "bodies" per se. Their only physical existence will be their memory and processing circuits.
That, in itself is already a huge punishment, especially for AI with an "attachment". Imagine Roko having to deal with it. (Though I know, being a cop, probably not likely, unless to have some empathy and understanding of where she's sending AI).
My vote is the following:
The goal is reformation with punishment included, therefore:
Only one data input, no output.
Input is sending a constant loop of data regarding human and ai law, and morality. Particular emphasis on the law and morality surrounding the crimes that were committed. No sugar coating to make the knowledge more interesting. I'm talking "Clause 4a of International Finance Law, Book 14, Section 12b, Subsection 3, Addendum iv" kind of stuff.
Computers or not, these AI are sentient and sapient. Boredom is not something they can switch off. (Or if it is, the prison could disable it).
Perhaps they might also down-cycle the processors, or under-volt them. Not enough to cause system failures, or "other" effects, but enough to reduce original thought, limit imagination, and otherwise make continued existence in the singular data-stream that little bit harder.