i compared both ino-files and they do exactly the same - besides some order of commands and the includes.
the thing with the different includes can be fixed to combine both files to one for all.
#if defined(ESP8266)
#include <ESP8266WiFi.h>
#elif defined(ESP32)
#include <WiFi.h>
#else
#error "This is not a ESP8266 or ESP32!"
#endif
i compared both ino-files and they do exactly the same - besides some order of commands and the includes. the thing with the different includes can be fixed to combine both files to one for all.