By Jaewon Kang and Annie Gasparro

Grocery stores and food companies are preparing for a possible surge in sales amid a new rise in Covid-19 cases and the impending holiday rush.

Supermarkets are stockpiling groceries and storing them early to prepare for the fall and winter months, when some health experts warn the country could see another widespread outbreak of virus cases and new restrictions. Food companies are accelerating production of their most popular items, and leaders across the industry are saying they won't be caught unprepared in the face of another pandemic surge.

Southeastern Grocers LLC secured holiday turkeys and hams over the summer, months before it normally starts inventory planning, said Chief Executive Anthony Hucker. And grocery wholesaler United Natural Foods Inc. has loaded up on extra inventory of cranberry sauce, herbal tea and cold remedies, said president Chris Testa.

"We started talking about Thanksgiving in June. That's earlier than we ever have," he said.

Associated Food Stores recently started building "pandemic pallets" of cleaning and sanitizing products so it always has some inventory in warehouses, said Darin Peirce, vice president of retail operations for the cooperative of more than 400 stores. The company is establishing protocols so it can better manage scenarios of high demand.

"We will never again operate our business as unprepared for something like this," he said.

These changes, a reaction to the sudden and massive shortages grocers experienced in the spring, amount to a shift from the just-in-time inventory management practices that have guided the fast-moving retail business for decades.

Now, food sellers are stockpiling months, rather than weeks, worth of staples such as pasta sauce and paper products to better prepare for this winter, when people are expected to hunker down at home. Ahold Delhaize USA, SpartanNash Co. and others say they are buying more food as soon as they can, stocking warehouses with wellness and holiday items. Many retailers are expanding distribution capacity, augmenting warehouse space and modifying shifts.

They say they want to be ready for a potential Covid-19 surge that experts are warning could hit as soon as this fall, as daily reported cases are increasing again in many states after falling in the summer. More than 200,000 people have died from the coronavirus in the U.S.

A fresh increase in demand in the event that officials reinstate restrictions on restaurants or workplaces would also run up against the normal holiday boom in grocery sales, further elevating demand for items like baking products, pasta, meat and paper towels.

Back in March, "we didn't know what we didn't know," said Chris Lewis, executive vice president of supply chain at Ahold Delhaize's Retail Business Services.

Ahold Delhaize, owner of the Giant and Food Lion chains, already has its holiday inventory in its warehouses. The grocer is also storing 10% to 15% more inventory than it did before the pandemic to ensure it won't run out of fast-selling items.

Industry executives say they don't think a potential wintertime burst in grocery demand will be as extreme as it was in March, when people panic-shopped, fearing grocery-store closures or food shortages. Consumers are better prepared this time around, said Sean Connolly, chief executive of Conagra Brands Inc.

Some retailers are also betting that recent investments in warehouses and e-commerce will help them meet demand for home deliveries in the coming months.

Still, some products such as cleaning wipes and canned vegetables remain hard for stores to obtain, partly because of continued high demand and because manufacturers are still trying to keep up. Some manufacturers are worried they will lose production capacity if infections break out among their workers or if other issues, such as lack of child care, prevent people from working.

Hormel Foods Corp. CEO Jim Snee said on a recent conference call that the company has 24% less inventory than a year ago. Its bacon, pepperoni, Skippy peanut butter and SPAM canned meat could run short if Covid-19 cases among workers interrupt production again, he said.

"We can't afford any disruptions," he said.

General Mills Inc. said it hasn't caught up with demand for Progresso soup, Betty Crocker cake mixes and Pillsbury refrigerated dough. It is increasing its production capacity and has hired 30 new outsourcing partners since March. The company said the entire industry is still struggling to rebuild inventory on similar items.

Manufacturers have given priority to making their fastest-selling products, which has helped some items recover inventory in recent months.

General Mills and Kellogg Co. said they have been able to rebuild inventory in their cereal businesses, for instance. "Even if the consumer can't find the exact flavor they want, we'll still have something on the shelf," General Mills CEO Jeff Harmening said in an interview Wednesday.

Campbell Soup Co.'s overall inventory is only about halfway recovered, and the team is pushing hard to fully catch up by January, according to CEO Mark Clouse. It is racing to get its Chunky and condensed soups and Swanson broths back in stock and adding production capacity for snacks such as Pepperidge Farm Goldfish crackers and Cape Cod potato chips.

"A lot of this is going to boil down to how much capacity we're able to generate," Mr. Clouse said.

Hy-Vee Inc., a chain of more than 240 supermarkets in the Midwest, is stockpiling additional sanitizing, cleaning and paper products when possible, but full variety hasn't returned, said CEO Randy Edeker.

Walmart Inc. Chief Financial Officer Brett Biggs said the company is overriding its grocery-ordering algorithms in many stores to build up extra inventory now, after decades of becoming increasingly lean.

"We've been playing catch-up," Mr. Biggs said at a recent conference. "But you've got to have supply down the chain with our suppliers to be able to do that."

Coca-Cola Co. and its bottling network are still making fewer varieties of drinks to meet demand for its top beverages. That has made it difficult for shoppers to find things like Fresca and caffeine-free Diet Coke in the pandemic. Meanwhile, Coke's business serving restaurants and other venues has suffered declines.

Coke CEO James Quincey said at a recent investor conference: "We have a clear strategy for how we want to come out of this crisis, but getting through the winter in the Northern Hemisphere will be the big test."

--Jennifer Maloney contributed to this article.

Write to Jaewon Kang at jaewon.kang@wsj.com and Annie Gasparro at annie.gasparro@wsj.com

Corrections & Amplifications

This article was corrected at 3:33 p.m. ET to reflect that Chris Testa is the president of United Natural Foods. The original version incorrectly said he was the CEO.