High taxes, price-conscious consumers and tricky logistical issues have made it tough for many foreign carmakers to thrive in one of Asia’s biggest economies.