From a stock investment standpoint, the auto industry has been dominated by electric vehicles (EV) and Tesla (NASDAQ: TSLA) for years. It's clear the long-term future of the industry is electric and the companies that were there first have been rewarded while the legacy companies have lagged the market.

But electric vehicle sales growth is slowing and profits, where they existed, are dwindling. Ironically, overinvestment in electric vehicles could lead to low profitability in the industry over the next few years. At the same time, internal combustion engine vehicle manufacturers are raking in cash and that's where the value is for investors.

The leaders in the auto industry today

Two stocks stick out as completely overlooked by the market today. General Motors (GM 0.48%) and Stellantis (STLA 0.57%) are profitable, but trade for single-digit price-to-earnings multiples.

GM Net Income (TTM) Chart

GM Net Income (TTM) data by YCharts

The reason they're cheap is obvious. Tesla and other EV companies have generated almost all of the industry's growth over the past decade.

GM Revenue (TTM) Chart

GM Revenue (TTM) data by YCharts

But what about cash flow? Growth is great, but in an environment where funding is tighter for companies and auto buyers, it's cash flow that matters. In particular, cash from operations, or selling cars.

GM Cash from Operations (TTM) Chart

GM Cash from Operations (TTM) data by YCharts

Stellantis has generated 23.5 billion euros in free cash flow over the past year but doesn't show up on this particular chart. GM generated $11.7 billion in adjusted auto free cash flow in 2023 and expects to generate $8 billion to $10 billion in 2024. Meanwhile, Tesla's free cash flow dropped 42% in 2023 to $4.4 billion.

I think traditional internal combustion engine trucks and SUVs will continue to generate strong revenue and margins in the internal combustion engine. And EV companies will continue to compete on price and drive margins and cash flow lower.

Value too good to pass up

Traditional valuation multiples are almost unusable in this situation. You can see the price-to-earnings multiple of Tesla is about 10 times higher than the multiple for legacy automakers.

GM PE Ratio Chart

GM PE Ratio data by YCharts

If you think legacy automakers are all doomed, that may make sense. But I think gas-powered cars have a lot longer runway than a lot of people think and cash flow keeps coming in the door. An analogy is the cigarette industry, which was left for dead in the late 1990s and early 2000s only to focus on generating cash from a shrinking business, which turned out great for shareholders.

Electric vehicles, on the other hand, are struggling to make money and even Tesla has needed to lower prices to remain competitive. That's a formula for losses, even if the market overall grows.

The auto business is tough, and investors want to own companies that can make money long-term. I think that's more likely to be GM and Stellantis, which are incredibly cheap today and have much better businesses than investors give them credit for.