I was rather surprised that a house buyer could take an electrician to court for work he did for the previous owners. It seems the new owner worked for the council and got the trading standards to take the electrician to court, and the electrician admitted guilt, so no real fight.
However it seems electricians can be taken to court for not doing their job, but as yet not seen a court case where the electrician said it failed and it should not have failed, so if unsure safe thing is to fail it. If some thing fails, then the person fixing it has to write out a minor works so takes responsibility.
However every edition of the wiring regulations say some thing like Note design date not installation date, so if it complied when designed, it still complies.
However CENELEC harmonisation documents and other regulations may be retrospective and we may need to comply with them, so we don't have a code 4 any more, we just say if we feel the installation is dangerous or potentially dangerous, we are not required to say what regulation, or law it breaks.
However it clearly has to be an electrical fault, a home with no electrics may not be considered as habitable, but it can't fail an EICR, lack of sockets, lights, or smoke alarms may make the home uninhabitable, but does not mean it fails an EICR.