I just was in a loaner while Tesla fixed a minor paint boo boo that was on the vehicle at delivery. The loaner was a P85+, and while it was near-like-new, the right side mirror didn't move properly when in reverse and it suffered the dreaded "droning at 70+mph" drive unit issue. For fun, I checked the CPO page with the stock number of the loaner, and it's for sale as a CPO.
I have no idea whether Tesla would do the "certification" work before delivering it to a buyer, but another data point illustrating that extreme diligence is needed when purchasing a Tesla CPO.