Automakers have spent more than a century refining gasoline and diesel engines -- and creating a network of factories and research centers to develop and build them. Now they face a worrisome prospect: The quickening transition to electric cars is sharply devaluing those assets, threatening not only short-term profits but also their long-term survival.