Consumer spending is still strong: It accounted for more than three-quarters of GDP growth in the most recent quarter. But Melda Mergen, deputy global head of equities for Columbia Threadneedle Investments, for one, is expecting consumers to spend less in 2019 than they did this year. When the economy hits the brakes, investors have historically sought haven in consumer staples stocks—companies that make toothpaste, cereal, and other products customers never stop buying. Those stocks have run up significantly in the past few years, however, as their dividends, often yielding more than Treasury bonds, lured income-seeking investors. Coca-Cola stock, for one, trades at 76 times earnings, nearly as much as Amazon, while Campbell Soup’s valuation is on par with Microsoft’s. “In a prolonged downturn, we’re worried that they wouldn’t give you the kind of defensiveness that they have traditionally,” says Tom Hancock, manager of the $6.8 billion GMO Quality Fund.

Instead, top investors are turning to certain discount retailers that should be largely impervious to both belt-tightening by consumers and the growing e-commerce threat. The discounters have developed a symbiotic relationship with online-only sellers, providing an outlet to offload excess inventory and leftovers from canceled orders—the kinds of bargains shoppers will still drive to the store to buy. Barbara Miller, who oversees $10.3 billion across the three Federated Kaufmann funds, is fond of TJX Companies, the parent company of T.J. Maxx, Marshalls, and other off-price chains. With its robust balance sheet and free cash flow, she expects the stock to outperform both the retail sector and the broader market.

Dan Chung, CEO and CIO of Fred Alger Investments, thinks Burlington Stores—a discounter with one-sixth the revenue of TJX—can grow even faster than its larger counterpart, opening more than 50 new locations a year (there are some 650 already) using a data-driven real estate strategy. Chung expects Burlington to grow its revenues at a rate of 10% annually in the…