You may want to switch to the Adafruit MQTT Library.
Could you try storing your Adafruit IO Username and Active Key in EEPROM, and then instantiating the MQTT client here:
https://github.com/adafruit/Adafruit_MQ ... 66.ino#L44The MQTT client doesn't connect to Adafruit IO's MQTT server until the
MQTT_connect function is called.
https://github.com/adafruit/Adafruit_MQ ... 6.ino#L111What you might want to try is reading your credentials within the
MQTT_connect function and create a new
Adafruit_MQTT_Client in that function with the credentials read from EEPROM.