After years of spending capital freely on all-electric and autonomous vehicles, automakers are starting to pull back.