Your problem is your are using OTA updates. There really is no reason to do this. You can perform OTA updates of your python code. There is no need to be able to flash the firmware over the air. It uses up way to much space to do that. This is one of the reasons why compiling your python code into the firmware is not good to do because the only way to update it OTA is by doing a firmware OTA which takes up twice as much space.
I am sure you can find an already written MicroPython library that will handle updating your python source files. I wrote one at one point, not sure where I have it stashed tho. It is probably on my old computer.