Like other major carmakers, Ford is having to invest heavily in electric vehicle development while managing margin risks.