Most MCU manufacturers have a line of "safety MCUs" nowadays, with built-in hardware ECC ("error correction code"). Not so much used for actual error correction, but to stop in a safe manner when RAM corruption happens.
The most prominent feature of "safety MCUs" is otherwise that they execute the code on two cores in "lock-step". There's various levels of more or less intricate error checking of hardware peripherals too.
One example is MPC56/SPC56 from NXP/ST. Similar safety MCUs should be available from Renesas, Infineon and others. Pretty much all modern cars use some flavour of safety MCU.