While many investors tend to concentrate on growth, it's really a company's balance sheet that will guard against the dangers that might arise from a recession or a market crash. As we saw in March, companies in the travel and leisure industries with high amounts of debt got into serious trouble. Many have since had to suspend their payouts, issue even more debt to stay afloat, or even worse, sell equity at low prices to prevent themselves from going bankrupt.

So if you're trying to stick to your long-term investment plan, but are nervous about a lack of new stimulus and election-related volatility, putting money toward the following three companies with the deepest cash piles around may be your best bet.

A cow in profile made up of white and pink dollar signs.

These top tech companies have great balance sheets. Image source: Getty Images.

Apple

A lot of eyes have been on iPhone giant Apple (AAPL 0.53%) this year. The stock has defied expectations amid government lockdowns, posting great results even in the pandemic-plagued June quarter. That seemed to fuel the case that Apple is more like a branded consumer staples stock rather than a cyclical hardware maker, and its shares have responded in kind, up 47% on the year.

Of course, a typical consumer staples conglomerate doesn't gush cash like Apple does, nor does it sport Apple's pristine balance sheet. As of last quarter, Apple had $194 billion in cash and marketable securities against just $112.7 billion of term debt and commercial paper. That not only gives Apple ample cushion if a severe recession takes down hardware purchases, but also gives the company ample fuel to keep repurchasing stock. In the past nine months, Apple has bought back a whopping $55 billion in stock, which is actually more than the company's $44.7 billion in net income over that time. Management has stated a goal of getting to "net cash neutral" over time, so shareholders should expect even more repurchases than the company is earning, especially if a bear market takes down the stock to more attractive levels.

However, I wouldn't expect too many negative surprises for Apple's results. The company's first 5G phones will be coming to market later this fall, and many Apple enthusiasts will likely be upgrading to the company's first model on the new wireless standard. 

Microsoft

Another cash-rich company with a moat as wide as the eye can see is Microsoft (MSFT 0.44%). As of last quarter, Microsoft sported a cash hoard of $136.5 billion against just $63.3 billion in debt. That cash pile is fueling a lot of good things for Microsoft, including business expansion, share repurchases, and a recent dividend hike.

Under the leadership of CEO Satya Nadella, Microsoft has grown from being the leading provider of computer operating systems and office software to much, much more. The company's Azure cloud computing division grew 50% in constant currency last quarter, and is now the second-largest cloud infrastructure provider by a good margin in an enormous and fast-growing market. Under Nadella, Microsoft has also made substantial acquisitions, including the LinkedIn social network in 2016, GitHub in 2018, and video game publishers Minecraft in 2014 and Zenimax Media just last week.

All of these acquisitions are great fits under either Microsoft's core enterprise software suite of business applications or its Xbox video game division. Speaking of the company's Xbox division, the new Xbox consoles will be launching this fall -- the first Xbox console in seven years.

Basically, there's an awful lot of good things happening at Microsoft, including a recent 9.8% dividend hike to $0.56 per quarter, good for a 1.1% yield, as a nice cherry on top of what should be a profitable growth company for decades.

Alphabet

Finally, Google search parent Alphabet (GOOG 0.06%) (GOOGL) is also looking mighty fine in the cash category. At the end of June, Alphabet had $121.1 billion in cash versus just $4 billion in debt. I'd say that's a nice cash cushion to weather any potential market downturns. Even though Alphabet's revenue ticked down slightly in the pandemic-affected quarter as advertising revenue declined, the company still generated $7 billion in net income in the quarter ending in June.

Unlike Microsoft and Apple, Alphabet doesn't pay a dividend, but it has been stepping up its game in terms of share repurchases this year. Through the first half of 2020, Alphabet has more than doubled its share repurchases over the first half of 2019, from $6.6 billion to $15.3 billion.

That's a good thing, as Alphabet's stock plunged with the rest of the market in March, and has slowly recovered since. Still, despite its roughly 10% rise on the year, Alphabet has lagged its other FAANG stock peers, and may present a good value on tech's recent pullback.

That's because Alphabet is both a coronavirus-resistant stock and a recovery stock all in one. Although digital advertising came down hard in the first half of 2020, usage of both search and YouTube skyrocketed, with YouTube advertising actually growing 5.8%, even as Google search and other digital advertising fell. What's more, YouTube premium subscriptions, which are grouped in with Alphabet's hardware in the "Google other" segment, likely grew as well, since that segment was up 25.6% last quarter.

But the real hidden gem in Alphabet's empire is its cloud division, which grew 43.2% to $3 billion last quarter, making it an ascending No. 3 player behind the aforementioned Microsoft in this long-term growth industry.

Add in Alphabet's "other bets" segment, which includes futuristic technologies like its Waymo self-driving car unit and Verily life sciences, and Alphabet is multi-faceted and highly profitable tech conglomerate. With a huge pile of cash, it's a defensive stock you can feel good about buying even if we're headed for another market downturn.