Save & Restore configuration question

Does ODrive retain the configuration for axes and motors if a new version of the firmware is flashed, or does everything get erased and reloaded?

The configuration is generally retained. However if the new firmware features additional configuration options then you will need to create a backup of your config. If you use the dfu commandin ODrivetool to do the firmware update, it will create a backup for you.