Agreed that software is just as important as hardware. Japan was good in hardware but failed at software which is why it fell behind.
When you're growing your software expertise it actually helps to have underpowered hardware, so you don't fall into bad habits, in western commercial IT so much code is sub-optimal because you can get away with it, all that power the hardware provides just goes to waste. BTW Japan didn't fail at software, it failed in adoption, this is a country where they still use FAX machines to conduct business, despite its outward modernity Japan seems deeply conservative, not necessarily a bad thing to maintain identity and social cohesion but not the ideal attributes in dealing with a cut throat world!
China has the same/better iterative advancement approach as the Japanese had in the 70s and 80s
But with much greater human resource potential sitting behind it and an internal market large enough to support/shield domestic companies from foreign dictates.
As an example the underpinnings of Huawei's Harmony OS is a very different design philosophy than its western peers and will, if adopted widely, make a material difference to China's technological landscape much in the same way that the WeChat ecosystem makes iOS largely irrelevant in China but at the next layer down.
The other modern Chinese attribute that is less spoken about is that it's very forward looking, China has not developed an internal combustion car engine to rival what the Germans and Japanese have, they're middle of the road but not class leading, 10 years ago you would have everyone bemoaning how backward and behind China is in cars and will it ever catchup and all the disasters that will befall the world if it did! However, it bet heavily in an electric automotive future so in one step become competitive and potentially leapfrogging past everyone.
Photo/light based silicon lithography will reach its physical limits (this time for real, when I was at University many many decades ago, had lectures in EE about about the challenges of scaling at 1um!) the pursuit of processing power and associated power consumption will have to go in a different direction, an inflexion point.
Keeping the lights on in the present, by figuratively staying alive (looking at you Huawei), is important but its the inflexion points where things will be decided. It might never matter if China doesn't get past 5nm line size in silicon semi conductors. Resources are finite throwing money at playing catch up is less efficient than throwing money at shifting the paradigm, obviously assuming you have the ability to shift the paradigm, which is why Africa is not full of AI startups! The emphasis on IoT, AI and increase in state sponsored R&D spending, both from necessity and ability standpoints it seems the powers that be have concluded that it can.
Long winded way of saying don't be setting up to fight yesterday's war but tomorrow's!