In the early stages of the last major economic downturn, Costco Wholesale Corp. did for its shelves what it preaches to its customers: It bought in bulk and saved.

The company, sensing a worsening economic slump, slimmed its product variety and bought more from fewer suppliers, said Richard Galanti, Costco’s chief financial officer. Doing so helped the retailer boost buying power with its suppliers and take advantage of the pricing benefits that come with buying more by the truckload.

“Clearly, it’s easier to manage 3,800 active items in a location than it is 60,000,” Mr. Galanti said, adding that operations became more efficient.

More companies need to think like that as the prospect of another downturn looms, according to research released Thursday by Bain & Co. In particular, companies should be assessing financial strengths and weaknesses to streamline operations and reduce costs through technology, according to the consulting firm.

Newsletter Sign-up CFO Journal The Morning Ledger provides daily news and insights on corporate finance from the CFO Journal team. PREVIEW

CFOs also must outline strategies for a variety of sour economic scenarios that include opportunistic investments, mergers and acquisitions, according to Bain, which examined financial results for nearly 3,900 companies world-wide across a variety of industries to determine which characteristics allowed some companies to thrive during rough economic headwinds.

“The plain vanilla response to recession is often wait for bad news, and then start cutting costs,” said Tom Holland, a partner at Bain and an author of the report. “But the more successful companies cut costs early, before things slowed, and did so through smart steps such as automation, rather than sweeping emergency cost-cut programs.”

That kind of strategy, including introspective downside scenario planning, helped about 10% of companies, including Costco, increase earnings before interest and taxes at a compound annual growth rate of 17% on average during the 2007-09 recession, compared with zero growth for those that weren’t as proactive, Bain said.

Fears of a downturn have resurfaced after more than a decade of steady economic expansion.

Two-thirds of CFOs said they expect the U.S. economy to enter a recession by the third quarter of 2020, according to the Duke University/CFO Global Business Outlook survey of more than 1,500 CFOs around the world. And nearly half of U.S. CFOs say a recession is likely to by the end of 2019, the December survey found.

But while most finance chiefs expect the U.S. economy to take a turn for the worse, less than half are preparing for it. Only 49% said their company had a detailed plan for a downturn, according to a February survey of 158 CFOs in the U.S. and Canada by Deloitte. Deloitte sponsors WSJ’s CFO Journal.

The absence of a backup plan is risky. A downturn can narrow the CFO’s field of vision to the bottom line, whereas stringent focus on working capital can help wring cash from inventory or late-paying customers, Bain said.

Those funds can ensure the company continues to invest in growth—another area that can suffer during a recession. Successful companies continued funding efforts such as research and development, new business lines and focused marketing campaigns throughout the recession, helping them win market share and expand reach, Bain said.

At Twinkie and Ding Dong maker Hostess Brands, finance chief Thomas Peterson said the executive team regularly reviews its pipeline of potential measures, such as those aimed at costs or pricing, that could be implemented in response to shifts in the market or the broader economy.

“You want to make sure that you have ideas that are somewhat thought out so that you can do the next measure, if needed,” Mr. Peterson said.

“And you want to have a pipeline of opportunities,” he added, saying that the company continues to be on the search for potential acquisitions that would dovetail with its core competencies.

Write to Tatyana Shumsky at tatyana.shumsky@wsj.com