Cracks are beginning to emerge in the global economy, made worse by the continued trade dispute between the U.S. and China. It has many investors beginning to worry that we could be on the brink of a recession. The next downturn is likely to weigh on corporate earnings, causing stock prices to plunge.

Some companies, however, have taken steps to insulate themselves from a recession and should do well even if economic conditions worsen. Three such recession-resistant stocks are Brookfield Infrastructure Partners (BIP -3.30%), TerraForm Power (TERP), and Enbridge (ENB 0.29%). Here's why they all make great buys ahead of the next economic downturn.

A safe with pile of cash inside.

Image source: Getty Images.

Built to thrive during the tough times

Brookfield Infrastructure has worked hard to make its business recession-resistant. One way the infrastructure company has done that is by focusing on owning businesses that produce stable cash flow. It typically buys those with earnings backed by long-term contracts or that operate under a regulatory framework such as a utility. As of this June, 95% of the company's cash flow came from stable sources, so a recession will have little effect on its earnings.

The company complements its steady cash flow with a strong investment-grade balance sheet. That gives it the flexibility to take advantage of opportunities that arise during challenging times. Brookfield has a history of doing just that, including making several investments in Brazil during that country's economic and political crisis of 2016. Given its current financial strength, the company can pounce on opportunities that may arise out of the next recession.

A final reason Brookfield is an ideal stock to own during a recession is its 4%-yielding dividend. The company currently has enough embedded organic growth to increase that payout by 5% to 9% per year for the next several years. That means investors will collect a steadily rising income stream that they can use to take advantage of stock buying opportunities that will likely emerge during the next market downturn. Add it up, and Brookfield's an ideal stock to buy when economic conditions start deteriorating.

A fully powered growth plan

TerraForm Power operates a growing portfolio of renewable energy assets in North America and Western Europe. It sells the bulk of the power it produces (currently around 95%) under long-term, fixed-rate contracts to high-quality customers. The company therefore generates steady cash flow in both good markets and bad ones.

The company uses the bulk of that money (typically 80% to 85%) to pay a dividend that currently yields 4.8%. TerraForm has enough growth already lined up thanks to a couple of needle-moving acquisitions to increase that payout by a 5% to 8% yearly rate through at least 2022.  As a result, investors can collect a steadily rising income stream that they could reinvest in other stocks during a market downturn.

On top of all that, TerraForm has a much-improved balance sheet. The company currently has no debt maturities until 2022 and recently boosted its cash position by selling some stock after its sizzling run-up this year. That enhanced financial flexibility will allow it to take advantage of investment opportunities that could emerge in the next recession.

A money bag with the word dividends written on it.

Image source: Getty Images.

All fueled up to continue growing

Canadian oil pipeline giant Enbridge shares many of those same characteristics. Long-term contracts and regulatory frameworks currently back 98% of the company's earnings, which enables it to generate predictable cash flow in any market condition. The company's low-risk business model has proved itself over the years. Enbridge continued growing earnings not only during the financial crisis but also in the recent oil market downturn.

Enbridge uses about 65% of its cash flow to pay a dividend that currently yields 6.4%. It reinvests the rest in building more pipelines and related infrastructure. The company has $19 billion Canadian ($14.3 billion) of expansion projects under construction, which should come online over the next few years. Those projects give the company the confidence that it can increase its dividend another 10% next year. Meanwhile, Enbridge believes it can grow its earnings by a 5% to 7% annual rate after 2020, which should support similar yearly increases in the dividend. Add that to the company's healthy balance sheet, and it's well positioned to continue prospering even if we have a recession in the next few years.

Ready for the next downturn

Brookfield Infrastructure, TerraForm Power, and Enbridge are as recession-proof as investors will find. All get more than 95% of their cash flow from stable sources, have healthy balance sheets, and visible growth prospects. They should therefore be able to continue growing their earnings and above-average dividends even if market conditions deteriorate. That makes them great stocks for investors to buy in preparation for the next recession.