ESP32 has no working SoftwareSerial. With a simple #ifdef ESP32 a hardware serial will be used instead. Minimum changes without influence on existing installations or usage.