Elon Musk, the Tesla chief executive, may be able to exploit his rivals’ weaknesses, but the United Automobile Workers union also has the electric carmaker in its sights.