I've had AI cars that have had punctures, and return to the pits to continue. Same with Electrical, and loose wheels. Transmission just dies, so they have to coast, usually never make it. Engine, nah, they think its just rain spray out the back!
Doesn't happen too often, but I have seen my AI cars do that. Just depends when it happens, and where they are on the track at the time.