The great microchip crunch that has squeezed the auto industry should be mostly over by the middle of this year. But carmakers shouldn’t be so quick to forget the crisis’ lessons: Not only will there be a next time, but that next time will likely be worse.

The shortage has brutally exposed vulnerabilities in the just-in-time production model that has become gospel for the industry. It’s also a wake-up call for automakers used to having volume leverage on suppliers. Manufacturers are not in the position to call the shots when many semiconductor producers have customers in the larger consumer technology sector eager to grab available production slots.

It may be tempting for carmakers to view the problem as a one-off event, tied to seesawing consumer demand during the coronavirus crisis. That’s essentially how they treated one of the last big supply crises — Japan’s 2011 Fukushima earthquake and tsunami disaster — that affected global chip supplies.

But this time is different.

Carmakers’ vulnerability to chip supply problems is only going to grow as the next generation of electric and autonomous vehicles comes on stream. The demand will accelerate with the increase of battery packs, electric drives, connectivity and infotainment systems, as well as the technology requirements of automated driver-assistance and autonomous-driving systems. Some research estimates for electronics in full-electric and autonomous vehicles indicate future vehicles may need more than 10 times the number of chips.

If the big automakers don’t take greater control over chip supplies, they are setting themselves up for more serious disruptions in the coming years.

The current crisis is essentially a self-inflicted wound, albeit an understandable one given how well the just-in-time philosophy has served automakers over time.

Automakers and suppliers sharply cut back chip orders around the second quarter of last year, fearing the pandemic would slam the brakes on consumer demand. When it became apparent that a V-shaped recovery was under way for autos, they ramped up orders. But it was too late — chipmakers had pivoted to meet strong demand from makers of cellphones and other consumer electronics.

One of automakers’ biggest mistakes was forgetting that there is broad demand for chips outside their own industry. The auto industry only makes up about 10 percent of global volume, making it a relatively less important customer than consumer electronics giants such as Apple and Samsung.

The volume of electronics demand in autos will grow, but it will take years for the industry to have an overriding impact on suppliers of semiconductors.

The other key mistake is the industry’s at-times blind reliance on the just-in-time production system. Because semiconductor-based components quickly become obsolete as technology demands change, there’s good reason for automakers to keep inventory levels low. But the drawbacks of overly lean production are painfully exposed when disruptions occur.

The current crisis makes it clear that automakers need to take a more managed, hands-on approach to ensure they can meet their growing — and increasingly sophisticated — need for microchips.

They need more transparency in their chip supply chain, beyond Tier 1 suppliers, to get a faster line of sight that will enable them to head off problems. Korean automakers Hyundai and Kia have been relatively unfazed by the crisis, likely because their suppliers are more localized in South Korea and part of their supplier “family,” giving them greater visibility and control over their chip supply.

Carmakers need to think longer term about how to use their just-in-time manufacturing approach in the global supply chain.

Asian production plants that make a range of products are producing and shipping large volumes of chips to the U.S. That creates prioritization challenges, time lags and geographic vulnerabilities. Building more chip production in North America that is dedicated to auto applications could be an attractive option for U.S. automakers, albeit one that would take years and lots of capital equipment and be fraught with complexity. Still, labor costs are less of an obstacle because chip production is highly automated. The more difficult questions will be around whether carmakers want to diversify into chip production or be willing to work with others more closely — either semiconductor manufacturers or other automakers.

Pooling capital resources to cover the hefty initial costs for facilities and equipment would be another viable alternative to spread the risk and volumes. Another option would be to establish a much tighter-knit relationship with semiconductor manufacturers in Asia.

While automakers are competing against each other, they’re also competing — as an industry — for scarce supply of a product for which there are bigger, higher-margin customers today.