This won’t end well for any of us.
They call it the race to the bottom.
This will hit both Japan and China. There is a downside to devaluing the currency. Nobody likes devaluing currency. Nobody would want to keep their financial assets or make investment using a currency that is randomly being devalued. If you have stocks and bonds in Yuan you would want to quickly trade it for you something in US dollars or anything that is more stable. Foreign investors will drop their overseas Chinese bonds like hot potatoes. Same for Japan.