That would be a method to use the premade feature from Espressif. But I'm nearly finished with my own solution. I already have an internal feature which first downloads the Firmware to a second space on the FLASH. The only stumbling block actually is this rewrite thing which should write the newly downloaded firmware from the second space to the "active" space and then reboot.
I've asked Espressif if they know why my thing doesn't really work. I can't see the reason actually. Because the routine is in ram and should be independent of the flash firmware. If even they have no answer I will use the premade thing.