New York (CNN Business) The retail apocalypse over the past several years has devastated America's department stores, chains and mom-and-pops. Stores are closing at record levels. The number of people working in retail is on the decline.

And all of that has happened at a time when the economy was strong.

But if the United States slips into a recession, as many economists fear it will sometime next year, the problems plaguing retail could get far worse. Store closings could accelerate and layoffs in the sector — a major provider of American jobs — could spread.

"Brick-and-mortar retailers are already in recession," said Mark Zandi, chief economist for Moody's Analytics. "They've been laying off workers coming up on three years. And this is a time when consumers are out spending aggressively. If the broader economy is in recession, there is going to be blood in the streets."

US retailers this year have already announced more than 8,200 store closings — well above the previous record of 6,700 in 2017, according to Coresights Research. By year's end, the annual tally could reach 12,000, Coresights estimates. Payless and Gymboree both filed for bankruptcy for a second time this year, closing nearly 3,000 stores between them.

Consumers shifting their purchases from traditional stores to online are big part of the problem. In fact, consumer spending remains strong and unemployment is at about a half-century low below 4%.

Meanwhile, many retailers have borrowed heavily.

"If the economy were to struggle, it would accelerate the collapse of a lot more of the debt-financed retailers. And you would see an acceleration in store closures," said Greg Portell, lead partner in the global consumer and retail practice of consultant AT Kearney.

So far, many of the retailers that have failed did a poor job meeting consumers' needs, Portell said. A recession would put a squeeze on even better managed, up and coming, retailers. "Their future depends on them being able to find financing," he said.

Consumers are likely to pull back on spending if unemployment starts to rise, Moody's Zandi said, and credit is likely to get tighter, both for retailers and for consumers.

"A lot of retailers are hanging on because the broader economic environment is strong, interest rates are low, credit is available," Zandi said. "No sector is more dependent on credit. If a recession comes, credit will get cut off both to the consumers and the retailers. That is going to mean a rash of bankruptcies and a lot of lost jobs."

And retail is one of the biggest sources of employment in the US economy, with 15.8 million jobs, or more than 10% of all jobs nationwide. The only areas to employ more people are health care and all the levels of federal, state and local government.

"It employs so many people in every community," Zandi said. "If consumers pull back and store closings mount, no other sector of the economy will be able to pick up that slack."

The retail sector has lost nearly 200,000 jobs since the start of 2017, with most of those jobs losses coming from traditional department stores and clothing stores. The job losses across the sector would have been worse had it not been for some new players moving into vacated stores. In a recession, those store openings are likely to slow, and store closings are likely to increase.

So far, the low unemployment rate has meant that many retail workers who lose jobs when stores close are able to find something else. If unemployment increases, as it does in a recession, it will be harder for laid off retail employees to find jobs.

"They are generally lower paying jobs. But they're very important to a very vulnerable group within the economy," said Zandi. He said because of that, retailing job losses could worsen any recession, no matter its causes.