Is there a way to design software that would ‘search for and find’ these ‘flaws’, or some other way to ‘defeat’ this if it’s intentional?
If you could dump the microcode, you might be able to do it. You aren’t supposed to be able to do that remotely.
The answer is “probably not” to your question. Microcode is a different animal than software. It presupposes knowledge of specific hardware elements that reside on a specific chip, even different versions of the same chip. It is very low-level stuff. It’s not like you can run an “antivirus” on it. You have to actually know and understand the hardware - and these days fewer and fewer people actually can do that.