Elon Musk has as much as $10 billion, not to mention his own personal fortune, riding on the growth of Tesla Motors (NASDAQ:TSLA) EV sales and SolarCity's (NASDAQ:SCTY.DL) solar and energy storage system growth. It's one of the biggest bets ever made on renewable energy and it's made him a household name across the country. 

To dominate EVs, solar energy, and energy storage Musk is trying to build out battery capacity before competitors can gain traction, and thus far he's executed well on that strategy. There's really only one place with the resources and wherewithal to derail Musk's hopes to dominate both EVs and energy storage -- China. The problem is that they may be doing just that.

China betting big on electric vehicles
The latest rumor out of China is that the country will levy a hefty gas tax and pour the revenue generated into expanding electric vehicle usage in the country. This could add billions to an industry that's already being supported by a government that's purchasing EVs for its own use in mass. In many ways, the concept makes sense for China's future and follows a path the country has taken in the past.

Chinese cities are congested with smog from everything from coal electric plants to the amount of gas burned by the growing middle class. So, there's an environmental driver for EVs.

But China also likes to be an early mover in new industries, particularly when large scale manufacturing is involved. EVs and batteries could be a huge growth market for China over the next few decades, and it's only logical that they would make a push into being a major supplier for the industry. China has used state-run banks to build out capacity in industries it wants to dominate, like electronics and solar, and I think batteries could be next, but I'll cover that below.

The biggest driver of China's push into EVs could be the country's growing reliance on foreign oil. You can see below that the gap between China's oil production and consumption is growing each year and it now has to deal with countries like Iraq, Iran, and Syria just to meet its energy needs.

China Oil Consumption Chart

China Oil Consumption data by YCharts

If EVs can reduce China's reliance on foreign oil it would be logical to push their adoption. The economic benefits would be a side effect of the improved energy security, something China's leaders have to be considering at the moment.

SolarCity's energy storage unit built by Tesla Motors. Source: SolarCity.

Why this is a problem for Elon Musk
You may think that China's expansion into EVs would be good for Tesla and on some levels that would be right. It would open up a new market for the Model S, Model X, and future Model 3, something that could be a positive for Tesla.

But if China decides to pour billions of dollars into electric vehicles and battery manufacturing it could be devastating for Tesla. Musk is spending $5 billion to build battery capacity at the Gigafactory in Nevada, and he now has to find end market demand for not only cars but batteries as well.

Part of the logic in building the Gigafactory was to lower costs and make EVs and energy storage more competitive in the market. But if China floods the market with low-cost product it could reduce Tesla's potential margin from batteries and create a competitor both in EVs and energy storage. It's something the country has done before in renewable energy.

China has played this game before
This isn't some far fetched idea I'm making up to scare Tesla or SolarCity investors, it's something we've seen play out before.

In the late 90s and 2000s when China decided it wanted to be a computing powerhouse the country's state-run banks poured billions of dollars into building out manufacturing capacity to compete with U.S. companies. Eventually, PC manufacturers in the U.S. either went bankrupt, sold to Chinese competitors, or decided to outsource electronics manufacturing to China. When China wants something -- it gets it.

More recently, the solar industry was upended by a massive expansion in Chinese capacity, funded by Chinese state-run banks. Billions poured into the market, flooding the solar industry with product and pushing out suppliers that didn't have the cost structure or financial backing to keep up. Most U.S. and European solar manufacturers went bankrupt leaving Chinese suppliers like Yingli Green Energy and Trina Solar who are supported by Chinese banks to this day.

If China decides to put billions into building out EV capacity -- particularly batteries -- it would put downward pressure on costs that currently don't exist. If China does make the investment in EVs that's been rumored, we could see a similar dynamic to what happened in the solar industry in the late 2000s and early 2010s. Investors had put huge multiples on solar companies, and when China flooded the market the stocks collapsed as U.S. companies struggled to survive under the pressure.

Here's a small snapshot of happened to solar investors from 2008-2012 -- and these are two companies that survived. Many more went bankrupt because of Chinese oversupply.

FSLR Chart

FSLR data by YCharts

China is the threat Elon Musk should be watching
Anytime I see that China is going to put billions into an industry I cringe at the effect it will have on U.S. companies. Without some sort of technological advantage over Chinese competitors it becomes a price war, even for a company like Tesla.

Remember that a significant percentage of capacity (around 30%-40%) in Tesla's plant is earmarked for energy storage for SolarCity. But if Tesla's batteries aren't cost competitive with Chinese commodity batteries it would be a competitive disadvantage for SolarCity to stay with Tesla.

At the very least, this is a threat worth watching for investors. Both Tesla Motors and SolarCity are priced as if they'll grow profitably for years to come, but if China decides it wants to own EVs or the future of battery manufacturing it could be terrible for both companies. China has done this before, and I wouldn't bet against them doing it again.

Travis Hoium has no position in any stocks mentioned. The Motley Fool recommends SolarCity and Tesla Motors. The Motley Fool owns shares of SolarCity and Tesla Motors. Try any of our Foolish newsletter services free for 30 days. We Fools may not all hold the same opinions, but we all believe that considering a diverse range of insights makes us better investors. The Motley Fool has a disclosure policy.