This doesn't happen in much hotter countries, does it?
Well, although it doesn't often make big news over here,
railways in countries with very hot summers have the same
issues we do.
Their rails may be stressed for higher temperatures,
but that's because they typically have long, very hot
summers, while our summers tend to be much less predictable. Even then,
if they have hotter days than their infrastructure is
designed for, they have to respond in the same way we do.
That's why you may have heard about rails in Spain,
Italy and Switzerland being painted white to keep the steel
cool and slower trains to prevent buckling.