You don’t say which version of Audacity you are using, but in the current 2.1.2 version (available here: http://www.audacityteam.org/download/windows/) automatic recovery is highly effective and rarely fails.
Yes, it’s partly random. You need to use the file time stamp.
See here for more information about manual recovery: http://manual.audacityteam.org/man/recovering_crashes_manually.html
Someone wrote such a script already, as an alternative to creating replacement WAV files. It requires installing python 2.7.6 (python 3 may not work correctly). See: https://forum.audacityteam.org/t/alternative-recovery-tool/30964/6 For Windows, ideally we would package it into a ZIP file or installer including just the three required python libraries.