Don't count on carfax. My wife's van had over $6k worth of repair from being t-boned which required 75% of the side to be replaced. Work was done by dealership and paid for by insurance company. Three years after the fact, I checked on it and the only items that were returned was the two visits for recalls. The guys in my shop then checked on three other vehicles, all of which had been repaired at various times, none of which showed up in the carfax reports. Needless to say, carfax lost a lot of potential business that day.
There just isn't anything to replace good sense and a detailed inspection of the vehicle.