If we can't safely imprison people, absolutely.
Do you believe that someone who committed murder deserves to be held against their will in an unsafe environment?
My point isn't that prisons must be completely safe and nothing could ever go wrong. They should, though, be on par with the relative safety of the world outside prison walls.