Energy stocks can be a great place in the market to find dividends that you can hold forever. Energy companies are often less speculative than growth stocks, and are built to generate consistent returns on investments over time. 

But not all energy stocks make great dividend stocks. Here a look at why I love Kinder Morgan (KMI 0.40%) and TotalEnergies (TTE) and their 5.9% and 4.6% respective dividends -- and why Petrobras (PBR 0.26%) doesn't have a sustainable dividend to bet on. 

Kinder Morgan

The pipeline business that Kinder Morgan is in runs on volume. If oil and natural gas are flowing through the system, it will make money. 

You can see below that for all of the changes in energy over the last decade, oil and natural gas consumption is rising, and recent data shows that oil consumption is near an all-time high in the U.S.

US Natural Gas Consumption Chart

US Natural Gas Consumption data by YCharts

This may seem counterintuitive given the growth in renewable energy over the past decade, but oil and natural gas consumption are not only not being replaced -- they are also growing. 

That may not last forever, and Kinder Morgan wasn't immune to the market drop from 2014 to 2018, but it's come out the other side stronger than ever. You can see that revenue is at an all-time high, and so is net income

KMI Revenue (TTM) Chart

KMI Revenue (TTM) data by YCharts

Competitors are no longer rushing out to build huge pipelines as capital spending becomes more constrained in the energy industry. That's why net income is up, and I think that shows the 5.9% dividend yield will be safe for the foreseeable future. 

TotalEnergies

Another company that's changed its attitude about investment in oil and gas expansion is TotalEnergies. Like most energy companies, it has pulled back on capital deployed and is looking to generate cash flow from existing projects rather than increase market share. You can see below that the impact is an explosion in earnings. 

TTE Revenue (TTM) Chart

TTE Revenue (TTM) data by YCharts

What makes TotalEnergies unique is its major investment in renewable energy. The company allocated 25% of total investment in renewables last year, and that's expected to grow to 30% in coming years. These investments are in everything from biogas to hydrogen to wind and solar energy.

TotalEnergies is one of the major oil companies in the world, and that gives it the diversification and scale to be a relatively safe investment. But it's also learning to invest in next-generation technologies, which is a big reason I like this 4.6% dividend yield. 

Avoid Petrobras

On the surface, Petrobras seems like an amazing dividend stock. The company paid out $0.65 per share in a quarterly dividend in November, implying a dividend yield of over 20%. In addition ot its regular dividend, it also paid two special dividends last year.

Like most oil and natural gas companies, Petrobras has been flush with cash recently as high commodity prices have helped the bottom line. But the company's history doesn't indicate the good times will last. You can see in the chart below that from 2014 to 2019 Petrobras underperformed TotalEnergies every year and they're currently nearly the same size on an enterprise basis. 

PBR Net Income (TTM) Chart

PBR Net Income (TTM) data by YCharts

Commodity risk is always present with energy stocks, but the political risk is what makes this a stock to avoid. Petrobras is a Brazilian state-run energy company and it ultimately answers to the country's leadership even more than shareholders. That means that decisions like dividends, divestments, and even exploration can be driven by politicians, not capital allocators. 

Investing in energy is hard enough, Petrobras has too many risks to be a stock to buy right now, despite a seemingly incredible dividend yield. 

Energy stocks and dividends in 2023

The energy industry has become much more attractive for investors, in large part because companies are no longer chasing growth and are instead content with making lots of cash for investors. That's why dividends are growing -- and for the foreseeable future, it makes this a very good industry for investors.