What you described in your second sentence is essentially what exhaust cooling is.
By cooling requirements, you don't necessarily mean that the structure itself needs to cool down to function properly. But because everything is packed so tightly in a Formula 1 car, you're worried about residual heat that leaks from component to component. So you need to take care of that somehow or it can result in various issues, from reliability concerns to efficiency concerns depending on where the heat is "leaking" to.
The mguh was a device that diverted energy that would otherwise contribute to exhaust and engine-bay heat and converted it into another form of energy (electrical charge in the battery). Or said more simply, it removes some of the energy that now ends up going into the exhaust system which is a much more spatially expansive component in an area that is usually tried to be kept as tight as possible in F1.
Now the mguh in itself, needed to be cooled down, however compared to what goes on in the rest of the system, the heat output of the mguh was not the main headache source. In any case, teams dealt with it with various ways, especially by the end of the regulation cycle, they probably got more and more clever with it. It's not comparable with the first year of a brand new regulation cycle that has different demands.