General Motors Co., an automotive giant with an ambitious goal of phasing out petroleum-powered cars and trucks by 2035 in favor of electric vehicles, plans to invest $500 million to upgrade its assembly plant in Arlington, Texas, to continue building gasoline and diesel-powered SUVs.