When trying to get your head around rich mixtures 'cooling' the engine it might be more productive to think about oxy acetylene torches. Pure acetylene produces a lazy, dirty (sooty) 'cool' flame. As you squeeze the oxygen trigger on the torch you're leaning the mixture and it burns hotter and cleaner. Keep adding oxygen and you get that hot blue flame - peak EGT if you.
That is exactly how a rich mixture 'cools' your engine - it's more correct to say 'produces less heat' than cools.