The U.S. economy just did something pretty special: It went an entire decade without dipping into recession. Considering that recessions are a natural part of the economic cycle, it's only a matter of time before gross domestic product (GDP) growth slows and eventually retraces for what'll likely be a short period of time.

When recessions strike, investor portfolios often take a hit. This means traditionally cyclical business models, as well as stocks with premium valuations, feel the brunt of the pain.

But this isn't always the case for mega-cap stocks. A mega-cap stock is a company with a market cap of at least $200 billion that almost always has a time-tested business model. While some megacaps would find themselves in less-than-enviable positions if a recession hits (e.g., Amazon's retail business would likely see sales slow considerably, while Facebook's ad-pricing power might dip), others would be set to thrive.

Here are the three megacaps you'll want to own when the next recession strikes.

A person writing and circling the word buy underneath a dip in a stock chart.

Image source: Getty Images.

Johnson & Johnson

Although healthcare conglomerate Johnson & Johnson (NYSE:JNJ) has seemingly gotten itself in some hot water in 2019 concerning baby powder litigation, it's arguably one of the safest investments on the planet. In fact, it's one of only two publicly traded companies to sport the AAA credit rating from Standard & Poor's (S&P), which is a grade higher than the AA rating bestowed on the U.S. federal government. Put in another context, S&P has more confidence in Johnson & Johnson repaying its debts than it does in the U.S. government making good on its outstanding debt.

What makes J&J's business so special is the balance it offers. There are three business segments here, each of which provides something that the others do not. First, there's consumer healthcare products, which offers the slowest growth rate but the most predictable cash flow. Second, there's medical devices, which provides an intriguing long-term growth opportunity as the global population ages. Finally, there's pharmaceuticals, which delivers the bulk of the company's growth and margins but is reined in by finite periods of patent exclusivity.

How's this working for J&J? In 2018, Johnson & Johnson secured its 35th consecutive year of adjusted operating earnings growth, and it's on a 57-year streak of having increased its payout, which places it among the elite of income-paying stocks.

We don't get to choose when we get sick or what ailment we develop, which makes healthcare a predominantly recession-resistant industry. Given J&J's track record, there's no reason for investors not to place their trust in this company or its management team.

Two smiling young women texting on their smartphones.

Image source: Getty Images.

AT&T

Even though AT&T's high-growth days are over, investors would also benefit from the predictability of owning telecom-giant AT&T (NYSE:T) during a recession. The company generates most of its income from its wireless segment, which is good news given that smartphones have practically become a basic need for consumers. Whereas advertising tends to decline during recessions, subscription-based services, such as AT&T's wireless division, are less likely to see a drop-off in revenue.

Furthermore, AT&T is in the midst of the biggest infrastructure upgrade cycle in nearly a decade: the rollout of 5G networks. While this will increase near-term expenditures, it'll result in a significant smartphone upgrade cycle and a lot more high-margin data consumption. In other words, AT&T's pedestrian growth rate may be about to get a shot in the arm that'll last for a couple of years.

Streaming and traditional cable also provide sources of steady cash flow for AT&T. Remember, AT&T acquired Time Warner and its lucrative CNN, TBS, and TNT networks in 2018, and plans to use these networks as a dangling carrot to attract streaming users. It'll also be launching the HBO Max streaming service in the first half of 2020.

Suffice it to say that AT&T's 5.3% yield is about as safe as they get.

A hand placing a credit card into a chip-reading point-of-sale device.

Image source: Getty Images.

Visa

Finally, despite being in the traditionally cyclical financial sector, payment-processing giant Visa (NYSE:V) is a company that laughs in the face of recessions and comes out stronger each and every time.

Domestically, Visa is unstoppable. It has more than half of all credit card market share by network purchase volume in the U.S., with rival Mastercard more than 30 percentage points behind. Translation: It's the go-to payment processor for U.S. merchants, which isn't a bad place to be for a country where 70% of GDP is derived from consumption. 

Visa also has an incredible long-term growth opportunity around the world. In 2016, it acquired Visa Europe to expand its presence in the region, and has only begun laying the groundwork for payment-processing infrastructure in underbanked regions like Southeastern Asia, the Middle East, and Africa. With 85% of all global transactions still being conducted in cash, Visa has a reasonable shot at maintaining a low-double-digit growth rate for a long time to come.

It's also important for investors not to overlook the fact that Visa isn't a lender, like some of its peers. Operating solely as a payment facilitator means that Visa doesn't have to worry when growth slows and credit delinquencies rise. This is a big reason why its stock has continually headed higher.

With plenty of opportunity domestically and abroad, Visa can continue to generate above-average growth, even when a U.S. recession strikes.