It was a jolt, even by the standards of St. Clair. Mr. Cheatham recalled hearing from other men inside: “Maybe we can take this camp. What they going to do, lock us up? Where they don’t have any rooms? And what if I get transferred? That’s a win-win.”

Staffing levels continued to fall, along with the morale of officers who remained. Twelve-hour and 16-hour days became mandatory. The number of officers on duty at any one time dwindled to perilous levels — this when an officer had been stabbed in the head and killed at another Alabama prison with dangerously low staffing levels.

In the fiscal year ending in September 2016, there were 249 reported assaults at St. Clair, a more than tenfold increase from the same point six years earlier. The number of corrections officers was down by nearly half over that same period.

Since the summer, officers from other prisons have been brought to St. Clair to work overtime shifts, an emergency response team has patrolled almost daily, and several hundred inmates have been transferred to other prisons, resulting in a population at capacity rather than far above it. A $3.5 million plan is underway to replace the locks. Though the bloody headlines continue unrelentingly elsewhere in the system, inmates and staff at St. Clair say, warily, that recent months have been quieter.

Mr. Dunn, the corrections commissioner, points to this as support for his conviction that the root problems at St. Clair and in the Alabama prison system lie in the numbers. “I still believe that the fundamental, systemic problem is a combination of lack of staff and overcrowding,” he said.

He described the recent efforts at improving St. Clair as only a temporary fix, “robbing Peter to pay Paul.” The construction of modern prisons, he said, is the important first step to making changes that will last, allowing for safer facilities and more rehabilitative programming. But the plan, still making its way through the Legislature, has met with deep skepticism, objections that it costs too much, worries from small towns dependent on prisons for jobs and arguments that it does not address the fundamental problems. And then there are those, like Mack Waldrop, for whom any of it is too late.

In June 2014, Mr. Waldrop learned, through a call from a St. Clair inmate with an illicit cellphone, that his son Jodey had been stabbed in his cell. Mr. Waldrop said the warden later called just to tell him his son’s body was at the morgue. Jodey Waldrop would be one of three men killed in the prison that year.

“I wish God could give you every answer,” Mr. Waldrop said, when asked what could fix the prisons in Alabama. “Because I’d like to know.”