The patchwork system that has evolved to address the situation has drained morale among staff members and placed additional strains on prisoners.