World’s biggest manufacturers write off billions as they retreat from an EV boom that never was