I'm certainly not convinced building more prisons solves the underlying problem. Many experts think the criminal justice system should be seen as the ambulance at the bottom of the cliff, while early intervention is the fence at the top. You still need police, courts, and prisons, but if you're only investing in prisons and not in prevention, you're mainly dealing with problems after they've developed.
Evidence I've seen suggests that the certainty of being caught is a much stronger deterrent than simply increasing prison places or sentence lengths.
Early childhood programmes, family support, good education, and rehabilitation all have stronger evidence for reducing future offending than simply increasing prison capacity.
Countries like Norway and Finland imprison far fewer people but invest heavily in rehabilitation and generally achieve lower reoffending rates. To me, the real measure of success isn't how many people are in prison, it's how few repeat their previous behaviour. Prison is, in so many ways, a waste of money.
However, what Labour is dealing with is the accumulation of the mess created by other governments. It would seem less partisan if we gave AB et al a little more than two or three days to introduce a better policy than the current one. Until that point, sadly, they have to use what they have available.