Heat was not a problem. The flashguard is unnecessary when used with the long Gew98, as said above, the muzzle was forward of the bayonet's crossguard well away from the grips. The same can be said of the Kar98k developed and used after 1933. Flashguards were fitted to all new production bayonets beginning in 1915. The guards were added to earlier standard bayonets - the Sg98, Sg98/05 and Sg84/98 - by unit armorers also starting in 1915.
The need for the flashguard came when the bayonet was fixed to the Kar98a whose bayonet lug was only about one inch back from the muzzle causing severe damage to the bayonet grips, often blasting the wooden grips off and occasionally charring them. Earlier bayonets without the guard that were on issue to units not using the 98a did not have them installed by unit armorers. After the 98a was withdrawn from front line service in the 1930s the flashguard was no longer necessary but Germany continued to make the standard issue Sg84/98 Type III bayonet with the guard through the end of WW2 in 1945 since it was felt that it avoided damage from rough treatment while being worn under rough conditions of usage.