Refreshing flash memories. Does it work?
Rewriting flash is indeed a mechanism to extend flash retention when your device is running in a high-temperature environment (at lower temperatures, flash retention is not so much a problem).

Texas Instrument's application report MSP430 Flash Memory Characteristics (which should also apply to all other NOR flash-based MCUs) says in section 4.2 ("Enhancing Flash Data Retention Time With Flash Refresh"):


  As explained in the previous section, data retention time is very much dependent on the ambient temperature of the MSP430 application. One possible solution to enhance flash data retention is refreshing the flash contents from time to time with software.
  
  In an ideal scenario, the application has idle time frames, where no external events must be observed. During such an idle time, the software can copy one flash segment into RAM or any other flash segment. After erasing the original segment, the content is copied back into the original segment. After such a flash refresh cycle, the data retention time for this segment restarts.
  [...]
  CAUTION
  The application must ensure that flash refresh of a flash segment is not interrupted by a power failure.