So much this. Power doesn’t come for free. It’s not like in the old days where you just slap on a better air intake and bigger exhaust and easily unlock some extra HP. Try that on a modern car and you’ll pretty quickly get a CEL and go into “limp mode” because the many sensors working in concert with the ECU start throwing unexpected values. Tuning the ECU with or without any other modifications can definitely unlock better performance, but it’s also at a cost. From worse fuel economy and emissions, to premature wear on engine and drivetrain components.
Of course there’s also the warranty aspect. I know on Subarus, they have a log that tracks every time the ECU is flashed or reset to factory, so they definitely know when the it’s been tampered with. They definitely have the discretion to deny a warranty claim for anything drivetrain related based on this. I can only assume every other automaker has the same.
If you don’t care about things like warranty, then go crazy, but know the risks and costs.