I suppose it all depends on the Buyer, and what he wants, or what he would have done to a standard car.
I suppose if someone was planning on buying a standard S3, and was planning to spend £5000 modifying it. But then found a modified car with all the mods he was planning, but for £2000 over standard, then it would make sense to pay more for the modified car. £3000 better off.
But that customer is far and few between. A wider audience if it was put back to stock.
My personal view is I'd never buy a modified car or previously modified car if it had anything to do with the engine. Even I perceive a modded car as one that has been thrashed. And should anything go wrong down the line, you'd get zero help from the manufacturer.
My old standard S3 engine went Pop! when it was out of warranty. Audi replaced the engine out of good will, as it was down to an injector fault. However, they insisted the dealer did very rigorous checks. If I'd had it remapped, they'd have laughed me out of the dealer with a broken car and a boot full of engine parts.
And for the majority of potential buyers, that is what they'll be scared of.
But ..... each to their own.