Whether you're looking for income today or building wealth for the future, high-yield dividend stocks should be a cornerstone of your portfolio. But too often, people get caught up in chasing the highest yield or buying stocks they recognize, while ignoring the risks a company may face if and when the economy moves from growth to recession.

Want to avoid creating a potential weak spot in your own portfolio? Don't risk too much of your portfolio in companies that are driven by consumer spending, commodity prices, or other levers that tend to get pulled when the economy goes soft. Instead, look for companies that provide something that's always in demand, generate predictable cash flows, and have a history of paying a sizable dividend (and growing it). If you invest in these kinds of stocks, there's a very good chance you will be rewarded with many years of market-beating returns.

Couple under an umbrella in the rain.

Make sure your portfolio is ready for a rainy day. Image source: Getty Images.

Three of the best could very well be companies most people have never heard of. Take Brookfield Infrastructure Partners (BIP -0.47%), Pattern Energy Group (PEGI), and CareTrust REIT (CTRE -0.38%), for example. Not exactly household names outside the investing crowd. But over the past few years, all three have rewarded investors handsomely with impressive dividends and total returns that have outperformed the S&P 500.

Keep reading to learn more about these three companies, and how they can help you reach your financial goals, even if we fall into recession.

The obvious opportunity hiding in plain sight

Brookfield Infrastructure Partners is the perfect example of an overlooked business that everyone depends on. This limited partnership -- a corporate structure that makes it more cash flow efficient -- invests in and owns energy, utility, telecommunications, and transportation assets, infrastructure that the modern world depends on. Whether it's supplying water or natural gas, data networks, ports, or power transmission lines, Brookfield Infrastructure is relied upon every day by people and businesses, no matter what the economic condition. 

Moreover, there's often little or even no competition. Many times it's either too expensive to build or there's just not enough demand for two of the same types of infrastructure to compete in an area. When this happens, the utility is often regulated to prevent it from gouging its customers, but the end result is predictable cash flows at reliably profitable levels. Moreover, Brookfield Infrastructure has built its asset in a manner that gives it opportunity to improve and grow its operating subsidiaries in order to make them even more profitable.

One only has to look at its history of dividend growth to see how incredibly talented its management is at developing assets and allocating resources to generate the best returns:

BIP Total Return Price Chart

BIP Total Return Price data by YCharts.

Looking at the future, the opportunity to continue delivering incredible returns is immense. The global urban middle-class population is set to grow by about a billion people over the next decade. Trillions of dollars will need to be spent to build and improve the global infrastructure.

If there's one thing about Brookfield that gives me pause, it's that the stock is near its all-time high. That has pushed its dividend yield below 4% at recent prices.

BIP Chart

BIP data by YCharts.

But instead of using that as a reason not to buy, I think the better approach is to open a position and, if the stock price were to fall, simply buy more. Brookfield Infrastructure is well-run, owns assets that people and businesses rely on across every economic condition, and has a huge runway for decades of growth ahead.

When it comes to energy, the winds are changing

The energy industry is going through a massive transformation. Even as oil and natural gas remain central to powering and transporting the world, the transition to renewable energy is happening. And while government policies to reduce emissions and combat global warming have played an important role in jump-starting the switch, the heavy lifting going forward will be as much about economics as regulation.

According to the U.S. Energy Information Administration, modern utility-scale onshore wind and solar power plants can be cheaper than most fossil fuel power plants today. More importantly, the technology continues to improve, and global manufacturing scale is going to keep driving down costs more. Looking out a decade into the future, renewables will continue getting cheaper, and the advent of low-cost energy storage will expand the size of the power pie that renewables can meet.

Pattern Energy is already taking full advantage of this trend. The company is in the process of repowering its Gulf Wind facility, replacing older wind turbines with newer models that will generate more power from the same footprint, increasing the cash flow this asset can generate. Between repowering older assets to increase the cash flows they generate and the ample opportunities to develop and acquire new projects, Pattern's next two decades could see electrified growth, and from an asset class -- power companies -- that see strong demand for electricity in recessions just as much as during economic expansion.

Investors who buy today would also capture a dividend that's yielding over 6.2% at recent prices, and that payout looks to be quite secure, with management having executed exceedingly well on a plan to grow cash flows and create a bigger margin of safety for the payout.

A housing and healthcare trend on the rise

A decade from now, it's estimated that there will be 80 million Americans over the age of 65, and more than 40 million of that group will be 80 or older. Those numbers will be roughly double the number of people in those age cohorts three decades earlier. That's what happens when the biggest generation at its peak population -- baby boomers -- all pass 65 by the end of 2029.

Taking it a step further, improved healthcare is also playing a role: More baby boomers will live well into their 80s and beyond.

Put it all together and the next few decades will require far more housing and healthcare facilities to meet the needs of this growing, aging population.

CareTrust REIT is already working to be a major beneficiary of this trend. Since its spinout from Ensign Group in 2014, it has more than doubled the number of seniors housing and skilled nursing properties it owns and tripled its earnings per share:

CTRE EPS Diluted (TTM) Chart

CTRE EPS Diluted (TTM) data by YCharts.

This growth has translated exceedingly well for investors. The quarterly dividend has been raised every year since initiation, and is up 80%, helping drive over 330% in total returns.

Looking ahead, I think CareTrust may just be getting started. It only recently passed 200 properties, and there are well over 10,000 skilled nursing facilities in the U.S. today, a number that's set to grow substantially over the next decade.

Like Brookfield Infrastructure, CareTrust's dividend yield is on the lower end of its historical range, and it's also much lower than other healthcare REITs. On the surface, that suggests it's overvalued. But a closer look says something else.

CTRE Financial Debt to EBITDA (TTM) Chart

CTRE Financial Debt to EBITDA (TTM) data by YCharts.

CareTrust is exceptionally well-run, and it also has one of the strongest, least-leveraged balance sheets in its business. That gives it both more room to make deals than its competitors and also leaves it with more retained cash flows it can deploy to get the best returns for its investors.

Combine its smaller size, its track record of growth, and the best balance sheet in the business, and CareTrust is worth paying a premium price for. That's particularly true if you're looking for recession resistance and a dividend you can count on.