It's torture even if applied to guilty people. But your point is valid, it's just "how to treat prisoners". Having no privacy on the toilet as a default is dehumanizing in itself but may not be torture, but sleep deprivation by strong lights and inadequate heating certainly is, according to most definitions of torture.