Older and vulnerable people in hot countries die... People who cannot avoid working in the heat - more working class and racial minorities working in shitty undocumented or immigrant jobs, will also be at more risk.
But equally, where heat is expected, do have better coping strategies. Indian friends of mine are sharing tips like types of drinks to try (and those to avoid), better clothing (loose, light colours, cotton etc) and avoiding over-dressing or exposing too much skin.
An older person in Romania which is the country I know which has 40C in the summer 'at times' would know to rest at the hottest part of the day (if they could) and that this is common, 1pm-5pm is people going home and eating their largest meal followed by a nap/hiding from the sun/heat. There were always places to stop and buy cold drinks. People knew the heat was risky and behaved accordingly.
Even the Romanian tower blocks have features to manage heat, the verandas are in the shade, screens so windows can be open without beasties coming in, closing windows when the temperature gets higher outside than in, keeping sunlight out of the rooms where possible.
People in hot countries really know what the signs of sunstroke and heat exhaustion are and how to treat them. A few years back at a UK event, a friend of mine went to collect her child at 3pm and found the creche had taken all the children outside to run around and play at 2pm while it was still SCORCHING hot. She found her child lying semi conscious under a tree which staff hadn't noticed! The creche staff hadn't remembered her child's hat and did not know how to treat a child with heat exhaustion - flapping uselessly and moaning. It was only cos friend is a healthcare professional that she knew what to do and cooled her kid down so that her kid was recovering by the time the ambulance arrived... Without friend turning up early, her kid could have been much more sick as it wouldn't have been noticed and wouldn't have been treated so promptly... Yes, a complaint was put into the creche provider and I think OfSted too...
Other comments about humidity also apply. Australian and Indian friends of mine both say high 20s 26-28C are more miserable for them in the UK than 40+ in Melbourne or Delhi for a range of reasons including not being acclimatised while living here and humidity.