I have not tried smaller version of program. It is basic - simple program only with libraries (OTA, SoftwareSerial,Wifi),
but it can not be processed by OTA. With Wemos D it is OK, but with ESP07 it is NOT OK because of space.
I have in ESP8266:
Program Size: 417840
FlashSize: 1048576
It is possible to say please - How many percent of memory must program have for successful processing with OTA?
Best regards
p4ppc