You're correct that the rail needs to continually have its stress managed. This could be cutting the rail and adding a new piece, or removing a bit. This is a fairly labor intensive and costly process so the railroads were very interested in coming up with a way to determine when a buckle or break was most likely.
Buckles and breaks were most common just after a train had left a section of track. The normal approach was to issue slow orders when the temperature got too high (buckle) or too low (break). So there was a lot of interest in finding more accurate ways to determine when slow orders were necessary and to optimize when to add/remove rail.
AFAIK this problem is still outstanding. The product I worked on years ago never quite succeeded. Railroads are a harsh environment.
Buckles and breaks were most common just after a train had left a section of track. The normal approach was to issue slow orders when the temperature got too high (buckle) or too low (break). So there was a lot of interest in finding more accurate ways to determine when slow orders were necessary and to optimize when to add/remove rail.
AFAIK this problem is still outstanding. The product I worked on years ago never quite succeeded. Railroads are a harsh environment.