Esp32 image transfer not all ftp tcpip packets arrive

I understand that, as it works fine when there is no load on the network ( I don't even know if the problem is in my WiFi network or just the consequence of overuse on my branch of the ISP net) and it is sure not at the FTP server I, again, assume packets are been dropped somewhere on their way to the FTP server and the TCPIP implementation on the ESP32 is just not able to track packets acknowledged by the FTP server so the ESP32 then is just not aware packets have been dropped and must be retransmitted.
May be someone with specific knowledge on how TCPIP is implemented on the ESP could give me a clue if there is a way out of this.