While the economy hasn't been its best this year, some experts predict that things could actually worsen in 2023. The U.S. could enter a full recession next year, potentially roiling the stock market even further.

However, investors shouldn't panic. There are plenty of companies that can survive even the worst economic downturn. Buying shares of such businesses can help investors sleep peacefully regardless of whether a recession comes.

Let's examine two robust companies to buy to help recession-proof a portfolio: Medtronic (MDT 4.05%) and HCA Healthcare (HCA 1.28%).

1. Medtronic

Past performance is never a guarantee of future success, but it isn't irrelevant, either. Take Medtronic, a medical device specialist that has been around for decades and has survived several recessions in its long history. The company's track record helps it in at least two ways. First, physicians need top-of-the-line medical equipment to care for their patients. It's a matter of life or death. Medtronic has built a solid reputation in this field, and like all customers, medical professionals are inclined to stick to what they know works.

Second, this industry isn't easy to navigate. Companies typically need to test their medical devices and equipment thoroughly before getting regulatory clearance. Medtronic has been doing that for years with great success. The company has earned 180 key approvals in the past 12 months alone.

Although Medtronic's business slowed amid the pandemic, economic issues, and currency exchange rate fluctuations, it still generates solid revenue and earnings. In the second quarter of its fiscal 2023 (ended Oct. 28), Medtronic's revenue declined by 3% year over year to $7.6 billion although it increased by 2% operationally (that is, putting aside the impact of currency exchange rate differences).

The company's adjusted net earnings per share (EPS) decreased 2% year over year to $1.30. Clearly, Medtronic isn't unaffected by the challenging environment we find ourselves in, and the same would be true in a recession. But the company's strength is that medical services of the kind it helps perform are always in need, even in the middle of economic downturns, allowing it to perform reasonably well even in difficult times.

It's also why Medtronic is a solid long-term bet -- even as it prepares to spin off part of its business to focus on faster-growing segments -- because demand for healthcare won't go away anytime soon.

Also, Medtronic continues to raise its dividend, which has increased by about 26% in the past three years. The company is a Dividend Aristocrat, having hiked its payouts for 45 consecutive years. In times of economic trouble, dividends can be an excellent source of passive income -- just one more reason why Medtronic is a solid stock to buy to prepare for a recession. 

2. HCA Healthcare

HCA Healthcare owns and operates various healthcare facilities, especially hospitals; it is one of the most prominent players in this industry in the U.S. Just like Medtronic, the non-cyclical nature of HCA's business would be a major strength if a recession occurs. Patients don't generally get to control when they are sick and in need of a hospital stay. 

HCA's revenue depends on occupancy levels and the procedures physicians order for their patients in its facilities. That is the last thing people will want to skimp on during an economic downturn. True, the company can be affected in other ways. For instance, HCA Healthcare's expenses and costs have been impacted by inflation, and that's bound to put some downward pressure on the bottom line.

Still, few (if any) companies can escape economic challenges of the kind we have seen lately wholly unscathed. HCA's business is resilient enough to survive any potential recession the economy might face next year and continue growing long after. The company will perform even better once coronavirus-related dynamics are entirely in the rearview mirror. In the third quarter, the company's revenue declined by 2% year over year to about $15 billion.

That's mainly because in Q3 of 2021, coronavirus cases soared due to the rise of the delta variant, leading to increased hospitalizations in some of the company's facilities. On the bottom line, HCA Healthcare's adjusted EPS came in at $3.93, down from the $4.57 reported in the year-ago period.

While HCA expects the impact of inflation to continue weighing on its costs, these issues won't be with us forever. Meanwhile, the healthcare giant is well-positioned to continue expanding its reach by enacting new facilities and offering more services to physicians and their patients. Although not a Dividend Aristocrat, HCA Healthcare is a decent dividend pick, having raised its payouts by 30% in the past three years.

Risk-averse and income-seeking investors focused on the long game will find what they are looking for in this company.

Look beyond next year's outlook

Naturally, there is no guarantee that there will be a recession next year. These predictions sometimes never come to pass. But even if we are lucky to avoid such a predicament, Medtronic and HCA Healthcare are solid stock picks. They are both leaders in their respective fields, deliver consistently solid results, and are riding the wave of an industry that is among the most essential. Recession or not, investors should consider purchasing these two stocks.