Consider that if Asia and Europe manage to replace a majority of ICE vehicles in a decade or two with EVs, oil production will necessarily decrease in the end. We'll have a glut of cheap oil for a while as other countries buy less, which will artificially prop up ICE vehicles until production slows and costs go up. When gasoline inevitably becomes prohibitively expensive (assuming EVs are indeed the future), the US could be left with pricey fuel and no real ability to dig itself out of the hole it's created. It's not just the battery factories, it's the knowledge, talent, supply chains, trade deals, infrastructure, sales pipelines, patents, etc.
The "long term gain" turns out to just be us killing off our entire auto industry slowly. The "free market" in this case is actually "the free market here in our bubble". Globalization isn't going to sell cheap Chinese EVs in Montana, and people buying an $8000 BYD aren't going to look at a Chevy Malibu. If/when that market eventually collapses because we got left behind by the rest of the world, we'll be regretful that we didn't put subsidies into batteries and the grid. After all, we did subsidize oil and the auto industry for decades and decades for this reason. How many politicians stumped on the promise of keeping Detroit going?