The answers here Dissolving cocoa powder in milk tell us to manually dissolve the Cocoa powder in the liquid.
Will it not be a good idea to put the Cocoa powder in the liquid while heating it so that it gets dissolved automatically? Why?
No, it is not a good idea at all. It will be worse, not better. What you are missing here is that cocoa powder does not dissolve at all, never, it just disperses in water (or milk). So there is no reason why methods for dissolving stuff would work with cocoa powder. You will need to use a method created for colloid-producing powders like cocoa powder, which is mostly starch with fat.
This is why the answers to the other question recommend the slurry method. When you are dispersing an absorptive powder like starch, you always run a risk of clumping, and the slurry is designed to work around that problem. But starch also thickens much more under heat, so if you were to not just forego the slurry, but simply drop the cocoa powder into hot water, this would be the worst choice possible, leading to instant unbreakable clumps. The slurry method wouldn't work with hot water either, you'll get clumps before you have created the slurry.
So, the short answer is: if you try it, it won't "dissolve automatically", it will produce an ugly undrinkable mixture of clumps.
Add liquid to powder and not the other way round, an ideally (not so practical in a home kitchen), mist the liquid into the powder.
@rumtscho is right in stating that there is no dissolving, only dispersion. Many fine powders clump, even some highly soluble and hydrophilic substances behave that way (polysaccharides like agar for example). The mechanisms are quite different, but surface tension of the liquid is always a factor, the finer the powder, the bigger role it plays in resisting wetting.
You are making a colloid. For effective dispersion, you need high shear. With enough shear force, liquid temperature becomes a non-issue for most combinations. So an electric hand blending will overcome the problem of clumping very quickly.
Alternatively, even with near boiling water or milk, if you add a small amount at a time and form a thick paste first with a fork or a stick, you will find that a low moisture paste (say 25-35% w/w) is not only fairly painless to make, but also painless to thin down with more liquid. Incremental wetting and incremental expansion of the liquid phase is much less energy intensive.
With a hot liquid, left with clumps standing in it, the reduced surface tension will usually allow some of the clumps to break down given time.
Add liquid to powder and not the other way round, regardless of whether you are using a blender or making a paste by hand. Hot or cold liquid should not make that much of a difference.
Adding to @rumtscho's answer, which is mainly about the effects of heat to the starch in cocoa powder, that cocoa fat is well known to have a melting point around body temperature. From my own experience, having clumps of cocoa powder in cold milk that is being heated - after some time i.e. at some temperature you can see the clumps breaking up, which doesn't seem to happen in cold milk. Which might be the reason for so much people to assume instinctively that hot milk or water is better than cold.
So from my point of view, the milk should be around or just above body temperature in order to ease the dispersion of the fat but not to have the negaive effects of clumping the starch as described by @rumtscho.
To answer the question: Yes it will be a good idea, but take care not to make it too hot. And do not just put everything into the pot but take the time and make the slurry.
You can mix it into a small amount of very hot water, then when it's well mixed add the milk. I do this very frequently. Don't add the water to the cocao, or use milk to start with. Stir with the handle of a table knife, or some sort of swizzle stick.
We always did it this way at home: Mix the cocoa powder thoroughly with some sugar and then add warm milk stirring constantly.
You'd better not, the milk is easy to boil while heating. Just dissolve the cocoa powder in hot water or milk then stir is okay.