I've never understood - if a simple remap can add fuel economy with no downsides, why don't the manufacturers change the stock mapping?
Sometimes they use the same engine and configuration with different maps for different models, pay more for more power.
Other times they leave head room for reliability, this can be in mechanical terms because the engine will be at its design limit with more power, or could be to cover people being cheap skates and putting poor quality fuel in, or missing service or 2 or 3, or those owners with no mechanical sympathy whatsoever (like not letting the car idle for a minute or 2 before switching off to cool the turbos and stuff, or redlining from cold etc).
Sometimes the power is what it is for repeatability, maybe they cant garuntee the higher power rating I'm more than 80% of engines they build but they can garuntee the lower power in 100% of the builds.
Or remapping could just shorten the life of the engine, however I've not seen hard evidence to prove either way tbh.
Similar to overclocking/ undervolting pc components, why Dont they do it at factory if the benefits are there to be had?
I ran a fleet of vans once where half the fleet had a remap (mostly for fuel consumption but also increased driveability) and the other half didn't. There was no discernable difference in the reliability of either in 175k of running. That said, the engines were supplied as the 75hp variant of the 1.6hdi engine and were very sluggish borderline dangerous for pulling away at roundabouts etc, the 110hp variant used exactly the same engine, turbo, injectors etc, so the map we had put on was effectively this map and the vans became much more driveable, maybe because the engine was already designed for the higher power that's why was reliable.
Anyway back to op:s question.
Modern ECUs now leave a marker on the ECU each time it's flashed and this cannot be removed (as far as I can tell) so if you needed warranty work carrying out and they checked the checksum on the ECU the warranty would be void.
If you are talking about a tuning box, then you could remove it each time it went to stellantis or for warranty work and they would be none the wiser as it leaves no tracer mark behind.
Personally I don't like tuning boxes, they usually trick the ECU into pumping more fuel in with no regard to other parameters, unlike a proper remap.