Now, first I forgot any delays and obviously, the network connection crashed immediately. Then I remembered I had to put delays, and got myself down to a delay of 2ms for stable operation. With 1ms, it fails.
Then I remembered the yield function. As far as I understood, this lets the ESP take over and do whats necessary. So I replaced my delay with the yield function (and later also added it in 4 other positions in my loop()), but then, my ESP is crashing again. Manages to answer 3 pings, then dies.
So, what am I misunderstanding? When is yield used? Is there another possibility to tell te ESP "Do what you have to, then let me do my thing again as soon as possible"?
Regarding versions: I set up the IDE with the board/libmanager, and those say my stuff is up to date. I haven't updated anything else. (I have not fully understood if the whole code of the ESP is replaced when uploading a sketch or if there is some firmware/bootloader I could update).