Tesla (TSLA 4.69%) has been a winning investment over the last three years, but the stock's returns have stagnated recently. Even after a recent run-up, Tesla shares are down about 18% thus far in 2022.

That's because Tesla's valuation got ahead of the business. With other manufacturers of electric vehicles (EVs) just starting to ramp production, investors would love to find the next Tesla stock before its valuation gets ahead of itself. Some think Rivian Automotive (RIVN 1.29%) could be that name. But Rivian comes with plenty of risks and a very difficult road ahead for the company to succeed.

Just getting started

While Rivian's business is just beginning to get its legs, in many ways, Tesla is also. Tesla produced more than 930,000 EVs last year and believes it can grow that number 50% annually for several more years. As it ramps up two new factories, CEO Elon Musk has already said the company might pick a location for its fifth manufacturing facility before the end of this year.

At its 2022 annual shareholder meeting in early August, Musk said the company could end up with as many as a dozen factories to hit a long-term goal of producing 20 million vehicles annually. Those vehicles will include more than just the car and SUV models it currently builds. Musk recently said Tesla's Semi Truck would begin deliveries as soon as this year. Its Cybertruck pickup model should still be on track to launch next year, too.

Tesla could also benefit greatly from incentives included in the Inflation Reduction Act. In some cases, tax credits for consumers buying new EVs will resume under the new law. Tesla was well past the previous limitation that ended those credits after a manufacturer sold more than 200,000 vehicles. Additionally, roughly 70% of current EVs for sale in the U.S. won't be eligible for the new tax credit due to manufacturing and cost restrictions, according to a Barron's report. That should help Tesla hold onto market share even as the number of EVs on the market skyrockets.

No room for error

Many current investment cases against Tesla are based on valuation. After the first six months of 2022, Tesla is on pace to earn about $11 billion in net income for the year. That would reflect a price-to-earnings (P/E) ratio of over 80. Even considering its steady growth, the stock has a forward P/E ratio beyond this year of nearly 70.

TSLA PE Ratio (Forward) Chart

TSLA PE Ratio (Forward) data by YCharts. PE ratio = price-to-earnings ratio.

While that is a high valuation in the near term, looking out several years and assuming the approximately 50% annual growth the company projects, the stock should have room to grow in the longer term.

However, Rivian has even less room for error as an investment case. The stock can't be measured with P/E as it is a long way from realizing net income. Its market capitalization is already about $30 billion, meaning plenty of earnings are already built into its valuation.

Tough quarter

Rivian's growth has also been slowed by macroeconomic factors, including supply chain challenges and rising raw material costs. The latter has forced the company to make decisions that have proven unpopular with its early customer base.

Earlier this year, Rivian tried to raise prices on its vehicles, but existing holders of preorders pushed back. The company subsequently honored original pricing for the approximately 80,000 existing preorders through the first quarter of 2022, forcing it to shoulder the added costs for those vehicles. More recently, Rivian also angered some potential customers by saying it would discontinue its lowest-priced models to improve production efficiency and presumably boost revenue.

Tesla also isn't immune to macro issues that many automakers are dealing with. COVID-19-related shutdowns and supply chain issues impacted its Shanghai plant in the second quarter. But what was, by all accounts, a tough quarter for Tesla still resulted in 42% year-over-year growth in total revenue.

In that context, it makes some sense for investors to be willing to pay for a stock that remains richly valued at recent levels. With more than 40% growth in a period of challenges and uncertainty, there's plenty of optimism surrounding the results of what a strong business environment will look like for Tesla.