The ideal is perhaps to prepare coffee at the best temperature for flavour, but then have a mandatory cooling-off time, so that the customer receives it once it is safe, for their mouth, throat and skin.
But this would cause a logjam at eateries, especially when a customer orders coffee and also cold drinks/food, which has a cost for the vendor. And many customers would object as well.
An alternative could be mandatory, prominent warning signs:
'Our coffee is prepared at Xº to ensure optimal flavour. Please wait Y seconds/minutes before drinking.'