I've only found mentions online about spraying post buckling during repairs, but pre-emptive spraying does (did) occur. You will hear about speed restrictions on hot days to avoid buckling.
https://www.researchgate.net/figure/Buckling-of-a-railway-tr...