As a broad methodology it isn't torture per say, sure. But the implementation in the vast majority of our justice systems 100% no question is aggregious torture.
Digestible source: last week tonight: https://youtu.be/_uSZwErdH3I?si=DfHkVDbGegVt06tJ
More detailed source: https://www.newyorker.com/magazine/2009/03/30/hellhole