Weary of being captive to geopolitics, car companies are looking for ways to replace powerful rare-earth magnets in electric motors.