PaulS:
So, what do you think happens when the MySQL_Connection instance uses the espClient instance to talk to the database? What is the PubSubClient instance supposed to do with that information? And, what is the MySQL_Connection instance supposed to do with the PubSubClient communications?
My understanding is, that WiFiClient espClient; initiates the WiFi connection and then both the SQL-client as well as MQTT use the WiFi connection.
EDIT: got it. I set up two instances (?) of the WiFiClient now. One for the MQTT connection and one for SQL-Server. Works now.
Many thanks for your help!