The carmaker invested too much and too late into a short-lived electric-vehicle boom, and now finds itself saddled with an aging line-up and questions about its future.