Really, really small improvement.
In the trace, the IP address of the OpenMQTTgateway is shown as a decimal. That could be changed into a regular IP address format by changing:
trc(F("OpenMQTTGateway ip: "));
trc(WiFi.localIP());
into
trc(F("OpenMQTTGateway ip: "));
trc(WiFi.localIP().toString());