China is finally getting a handle on African swine fever, the crisis that cut the nation’s hog population by at least a quarter and stoked inflation. Beijing still has hard questions to answer about food safety, not least as it grapples with an outbreak of a new virus in Wuhan. But bringing swine fever under control will be great for Chinese consumers, and for the businesses that serve them.

The swine epidemic created severe shortages of pork, China’s staple meat. However, food-price inflation slowed in December for the first time in 10 months, figures released Thursday showed. While it was a still-very-high 17%, that was down from 19% in the previous month.

The rate is likely to slow further after a seasonal bump in food demand during the Lunar New Year holiday, since the country’s stock of live pigs is now rebounding after falling since late 2018. The breeding sow population rose 2.2% in December compared with the month before, the third straight rise.

In turn, that means headline inflation, which was steady last month at 4.5%, is likely to start trending downward this spring, barring a dramatic ramp-up in oil prices.

More measured price increases could give the central bank more room to ease monetary policy to ward off trouble in the debt markets. They will also support consumer spending, which was pummeled in 2019 by a weak jobs market and skyrocketing pork prices.

Newsletter Sign-up Heard on the Street Agenda-setting analysis and commentary on the biggest corporate and market stories. PREVIEW

That could help struggling retailers, as households set aside less of their budgets for expensive food purchases. Core consumer-price inflation, which excludes food and energy, has slowed sharply since the second quarter of 2019, when food prices really took off. Sales of consumer goods grew only 6.4% in real terms in the first nine months of 2019 compared with a year earlier—the slowest since at least 2011.

A horrible Year of the Pig is drawing to a close for China’s food industry. If the labor market stays on the mend, which seems likely unless there is a sharper housing downturn or a renewed trade flare-up, vendors of other goods and services stand to benefit.

Write to Nathaniel Taplin at nathaniel.taplin@wsj.com

Corrections & Amplifications

China’s breeding sow population rose 2.2% on the month in December, while pig stocks at large farms rose 2.7%. An earlier version of this article and the accompanying chart incorrectly said the pig population rose 14%. (Jan. 9, 2020)