You are levelling yourself to think someone whose education ends with grade school to be actually thinking. He has done so many stupid things over the last decade.
And in China, all foreign politics are internal politics. Playing strong against the rest of world, at least by how it looks, will bring more power to him within CCP.
If Xi has a bad day he could start a nuclear confrontation with no one able to reign him in.
On the other hand, lots of software is written for STM devices so spending a couple of bucks more for their parts will save you development costs and time.