Just a quick follow-up:
Adding your line above to RUNME.sh has stopped the "Your Kindle needs repair" message, but the device is now stuck on the Kindle Tree screensaver image.
So clearly the factory reset is insufficient to repair whatever damage has been done.
I've also tried to use a variation of the RUNME file so as to get the device to produce a boot error log, but that has not worked for some reason.
Clearly only a full restore of the system partition will get this thing back on its feet.