She was dying.

Ms. Dockery’s death at age 36 underscores the dangers of the nation’s jails, where inmates are either doing time for the least serious crimes or have not been convicted of the charges against them. Jails often have fewer resources than prisons and, like the work-release center here in Goshen, lack medical staff. Illness and injury can go untreated and every week, it seems, brings a new report of an unsafe jail or a death that was likely preventable.

“It would be a national scandal if people realized exactly how bad it was and how much abuse inmates are subjected to when they become sick inside prisons and jails,” said William R. Claiborne, a lawyer in Savannah, Ga., who specializes in cases of inadequate medical care, such as one in which an inmate was told he was faking fainting spells, only to die of congestive heart failure. “The more marginalized that you are, the more likely you are to not be believed, the more likely you are to get denied care,” Mr. Claiborne said.

The problem is worse, he said, for those already discounted by society: As a black woman and a drug user, Ms. Dockery was in that category. Jails have not adapted to the growth of the number of female inmates, which has far outpaced the growth in the number of men, according to the Vera Institute of Justice, a group that advocates criminal justice changes and is focused on jail, and experts say that racial bias has contributed to worse health outcomes for black women.

In 2015, Sandra Bland, a 28-year-old black woman jailed after a traffic stop in Waller County, Tex., hanged herself in a cell. In December in Bexar County, Tex., Janice Dotson-Stephens, who was black and mentally ill, was “ignored to death,” as her lawyer put it, after her family had been told that she was not even in custody.

Ms. Dockery was sent to the work-release center for just shy of a year after she violated probation on a shoplifting conviction. Because she had failed a drug test on arrival, officers dismissed her complaints as those of a user in withdrawal, an ordeal that is rarely life-threatening. But she died of sepsis, probably caused by a perforated ulcer in her intestine, according to James P. Elliott, the Elkhart County coroner.