As the smartphone keeps staying on channel 1, in case of a channel switch a disconnect command would never reach the ESP32.Yes your code logs every event. It doesn't specifically handle the correct specific disconnect event however.
Thank you for your efforts.