Thanks, Chad. The credit for the original process should go to Milad, who explained it in an e-mail some time ago.
The waiting between uploads is a good idea. I don’t know how anyone can upload two sketches in less than 30 seconds with the glacial speed of the recent Arduino IDE updates.
I’ve also had the Arduino IDE corrupt the bootloader, which requires a horrible low-level fix. Hope this never happens to you