Not only is the French prison system severely underfunded, as you say, but it has been consistently so for years, despite repeated warnings from the EU. This has been compounded by recent laws handing out longer prison sentences for more crimes (but obviously not following through with a matching increase in funding for the prison system).
As very few prisoners actually vote, this horrid blight on France's human rights track record isn't going to change in a hurry.