I have had the chance of being a software developer for years and now work as an electronics engineer.
Any system with complexity comes with erros and bugs. Both the microcontrollers and ICs have their advantages and disadvantages based on their areas of usauge.
For small scale projects ICs are faster, cheaper and more reliable than Microcontrollers.
For Large scale projects with millions of inputs, analysis and comparisions logics, for sure microcontrollers have the edge over ICs.
All software fail at some point, even bugsless code is prone to modifications bacause it is saved on a ROM, resulting in logical errors (e.g., memory leaks) which are difficult to detect but sometime end in catastrophy.
To bullet-proof software based systems from failures in critical applications (such as military grade or life saving systems such as train control systems), "fail safe" concepts are implemented and developed.
Fail safe systems revert to a safe state in case an exceptional error occurs. Usually two processors run the same code, compare the results of each instruction, and if they are equal, the instruction is executed. Otherwise the system uses physical electrical relays to revert to a safe state.
Fail safe software based systems are used in train Interlocking and ATPs (Automatic Train Protection) systems.
Designing the same complex system with Ics is a great headache for any engineer. And that is why software was designed from day 1 !