Depending on the state of the market and the aggressiveness of any future buyer, there is always the possibility of court action if a vendor lies about not having done notifiable work, or price reduction if he 'fesses up, so from that POV it is important to know.
I certainly agree that a vendor is strongly advised not to lie about these matters (for the reason you give), but I don't think there's any need to lie, and I think that the potential consequences of telling the truth are probably somewhat over over-played.
The standard 'legal document' involved is the form TA6, which merely asks whether any electrical work has been undertaken since 1.1.2005 (Yes/No and, if yes, the year - no details). Other details would only be revealed in response to any subsequent questions from the buyer's lawyers.
However, the main point is that, from a potential buyer's viewpoint, being told that notifiable work has been undertaken without notification (i.e. 'illegally') is no different from being told that non-notifiable work had been undertaken ('legally')(particularly if DIY) - and, indeed, not much different from being told that
no electrical work (and hence probably no I&T) had been undertaken for many years. In any of those cases, a buyer really can't be sure about the state/safety of the electrical installation without having an EICR undertaken. Some buyers will, of course, try to use anything as an excuse for trying to get a price reduction, but it would be irrational for them to try to argue that non-notification of notifiable work was, per se, a good reason for a price reduction - after all, legally-undertaken non-notifiable work could (particulatly if DIYed) have been undertaken just as incorrectly/dangerously as could non-notified notifiable work.
Kind Regards, John