Another myth is that trotting or cantering will cool horses off. The rider feels refreshed by moving through the air. However, horses produce more heat to create the breeze than they lose to it. The temperature of a trotting horse goes up, not down. You can prevent heatstroke by providing protection from the sun and by always having a salt block available.
People underestimate how much radiant heat is gained by standing in the sunshine.
Also, a salt block will provide electrolytes lost in sweat. A horse will sweat just standing in the pasture and will lose a lot of sodium and chloride and fair amount of potassium. While riding, whether out on the trail or in a competition, it is important to take lots of breaks with the whole horse, head to tail, in the shade. The two most important factors are horse fitness and rider awareness. Watch for signs of heatstroke and cool it before there is a problem.