ULN2003 isn't the best for that purpose, especially that saturation requires input level greater than 2.7V.
You're better using MOSFET with low Vgs, such AO3401, where saturation could be achieve with only 1.3V.
Of course the router need to be configured to provide proper port forwarding.
You've asked how to get ESP32 WebServer exposed, but now you are talking about MQTT, which is completely different thing ...
Espressif Systems is a fabless semiconductor company providing cutting-edge low power WiFi SoCs and wireless solutions for wireless communications and Internet of Things applications. ESP8266EX and ESP32 are some of our products.