If it helps anyone.
Mi current ESP32 code, uses BLE GATTS for some configuration from mobile apps.
I struggled a lot because if the ESP32 started with the BLE Init, there was no way that MQTTS could connect to the cluster. If I connected to the cluster first, and then raise the BLE GATTS, the ESP32 bit a panic restart.
After reading some websites, I figure out that this was a memory leak. Then I reached NiMBLE, which is a kind of reduced ArduinoBLE library with only GATTS/C, and it leaves all the heavy parts por BT Serial and another stuff.
NimBLE can be found here:
Cheers
FBP