Honda has struggled in China to compete with electric, software-driven cars made by rivals such as BYD.