As the auto industry shifts from gas-powered vehicles to electric vehicles, there will be many winners and even more losers. EVs represent the largest disruption in decades for the auto industry.

While it can be tempting to invest in young EV companies hoping to grow into industry giants, that's a risky proposition. The auto business is hard. It's capital-intensive and prone to severe downturns. If you want to invest in EVs, pick a company that has the financial fortitude to sail through a crisis and the wherewithal to avoid flying too close to the sun when everything is going right.

An EV giant in the making

General Motors (GM 0.38%) was nearly killed by the financial crisis. It went through bankruptcy in 2009 and required vast government support to come out the other side.

The new version of GM that emerged from that process is a very different company. Under CEO Mary Barra, GM has maintained a rock-solid balance sheet and greatly improved profitability, all while investing heavily in EVs and autonomous driving.

At the end of the second quarter, GM's automotive arm had over $25 billion in cash and marketable securities paired with about $16.5 billion of debt. A cash-rich balance sheet gives the company breathing room during a downturn and helps support its investments in EVs.

GM has six new EV models coming this year, including the electric version of its Chevrolet Silverado Work Truck. The company produced 50,000 EVs in North America in the first half of 2023, although most of those were not built on its new Ultium platform. Ultium brings significant improvements, including modularity that allows GM to build any type of vehicle on the platform. The company expects to produce 100,000 EVs in the second half of this year as production of Ultium-based models ramps up.

Notably, GM is leveraging the benefits of its Ultium platform to launch a second-generation Chevrolet Bolt. Previously, the company planned to kill the Bolt, an affordable EV that makes up a big chunk of GM's current EV sales. By building the new Bolt on Ultium, the company can bring it to market faster and with lower engineering expenses and capital investment than previously possible . While much of the attention is on GM's upcoming electric trucks and SUVs, there's certainly a market for small, affordable EVs.

By 2025, GM expects to be generating more than $50 billion in revenue from EVs, driven by North American annual production of about 1 million vehicles. GM also expects the EV business to be solidly profitable by then, with EBIT margins in the low-to-mid single digits.

Enormous upside

GM is valued at about $47 billion today. That's an incredibly pessimistic valuation. The company is targeting around $300 billion of annual revenue by 2030 and EBIT margins as high as 14%, driven by EVs, software, and its Cruise autonomous driving subsidiary. Even if GM falls well short of those goals, the potential upside is enormous if the company can even get within the ballpark.

GM stock also looks impossibly cheap based on the company's current results. Analysts expect the company to report earnings per share of $7.71 this year, which puts the price-to-earnings ratio at less than 4.5.

Of course, there's plenty that could go wrong for GM. The EV business may not be as profitable as the gas-powered vehicle business in the long run; increased competition could relegate GM to a smaller market share than it achieves today; GM's autonomous driving efforts may not lead anywhere; and software may not be as big of an opportunity as the company believes.

But with such a pessimistic valuation, investors are getting a large margin of safety with GM stock. Not everything has to go right for GM to provide solid returns in the long run. In fact, very few things need to go right. While GM isn't the most exciting EV stock, it looks like a no-brainer for long-term investors.