If you know how D4 is defined, the answer becomes self-evident
Further down you’ll also find the definition of TX1 for the Xenon.
As long you don’t call Serial2.begin() D4 won’t be used as TX1 but the pin number would in both cases be 4.
You can write this obscure code and it would render perfectly valid results.
pinMode(D4, OUTPUT);
pinMode(D4, LOW);
digitalWrite(TX1, HIGH);
if (digitalRead(D4) == LOW)
Serial.println("This will never happen");
Thank you @ScruffR for referring me to that document.
My main question was what would happen if I use D4 for OLED reset, AND also use Serial2 on the Xenon? Am I better off using a different pin for the OLED’s reset?
Most I2C SSD1306 devices don’t need the hardware reset line. They can be reset in software over I2C. I never connect it and I use a lot of those displays. In most libraries you can set the reset pin to -1 to indicate that you want to use software reset.