The UK's parole system is generally pretty good. The reoffending rate is pretty low, 0.5% I believe - https://www.amazon.co.uk/gp/product/B0CPJW85Y1/ref=ppx_yo_dt_b_d_asin_title_351_o00?ie=UTF8&psc=1 (beware this is a paid-for book, but it is written by a senior parole board member (Rob McKeon, he's been on radio and tv talking about it, so his name is public domain).
Just let them out when they are no longer a threat to anyone. Same goes for thieves and anyone violent, probably a lot of other categories too.
The criminal justice system should be protecting the law-abiding public or anyone vulnerable. It currently is not. The latest reoffending rate I could find is 37.4% - https://www.gov.uk/government/statistics/proven-reoffending-statistics-april-to-june-2022/proven-reoffending-statistics-april-to-june-2022
The parole system seems a better judge of potential reoffending than, well, judges.