Question about restoring routers

Recently I was reading that flash can go bad (lose data) after like 10 years or so and I started poking around with the mtd devices and backing up the router. My understanding is granted you can use the original install files and the backup, maybe you can restore any changes I made myself? I usually install the usb storage, samba server, and stuff for yt-dlp.

MY QUESTION IS THIS THOUGH
Would it be right to say, that like the tftp update function is in the SOC somehow, or does it rely on part of the flash chip being coded as it? When we update the flash, is it typical for parts of the flash to not be altered?

just wondering.

No.

Yes.

The typical push-button tftp recovery is implemented in the (OEM-) bootloader, typically at the very beginning of the flash chip and usually left untouched by OpenWrt (if possible also marked as a read-only flash partition, but that isn't always possible). While it might require intent, you can damage the bootloader and end up with a bricked device.

Some SOCs (e.g. lantiq) do offer a serial based recovery mode in addition, but that's relatively rare and requires jumping through quite a few hoops (open case, connect to the serial console, identify the boot-sel pin 'somewhere' on the board and pull it down to GND (or something more complex), feed boostrap images over serial, boot, recover). Great if that feature is available (and documented), but it rarely is.