If the car failed mot in 2016 due to engine check light , main cause would be air bag light 02 sensors for emissions etc.
Going back to your original question, did you not do a check on the vehicle pre buying. And as of clearing the codes a dealer may not of cleared them.
I clear my own codes if they are present, but in 2 years ownership have not had any in the lexus. So the dealer may not know any thing about them.
A £30.00 code reader will tell you fault and code in most cases. But that is only if engine light is on. A more expensive machine will do air bags and the like.
Also the cheap machine will clear the codes as well, so no knowledge of them will be found. So no you have no proof the dealer knew anything of the problem { problems }
Also the car ran for 14 months with no fault, so i would assume it flagged a different fault. Most cars when engine light plays up and are cleared, until problem
is fixed reoccur within a couple of weeks. That is my experience so they may do the scan but you may have the parts to buy.