OTA Programming of STM32
If you are using less than 50% of your internal flash (and the new SW is also &lt; 50%) then you could load the new software into the upper part of that memory, test it runs and then copy into the lower half once you're happy.

You would need some sort of bootloader to do this however, I'm sure there are plenty of STM32 guides on how to do this. Your approach of using the external flash memory is fine too, and would allow you to perform a CRC on the new SW image data once it has been transferred over before copying it into your internal flash. I'm not sure if the STM32 will allow you to execute code from the external flash though.

A bootloader is usually a small section of the internal flash which is written to handle all this, but this code needs to be well tested as you can usually only update it back at base (physical connection to a programmer) and not usually OTA.

Guide here

STM guide:
STM