De-soldering an MCU and soldering on a new oneis typically far from trivial. We're typically not talking about dedicated big through-hole flash chips here. We're often talking about MCUs with integrated flash memory which are surface-mounted and often with pins on the underside.
In general, I find it easier to desolder and replace surface mounted parts. With those, you just have to hit it with some hot air, it melts all the solder at once, and lifts right away. The chips are small, so it's not too bad to heat the whole thing evenly with a small air gun.
Through hole parts need a lot more heat across a bigger area, or you have to go pin by pin. I've scorched many a through hole board trying to desolder something, cursing at those who didn't socket the chip in the first place.
Want to annoy a repair person? Pot the whole thing in epoxy.
The saving grace here is that ESPs have radios and require certification which is expensive. As a result it is common for vendors to use pre-certified modules that are provided on a modular PCB with castellated half-holes. These are relatively easy to desolder.