Sorry for my English, I'm Brazilian using a translator, my solution briefly (not permanently) was to turn off the phone in safe mode, holding the on and off button, and pressing It on the screen you will see security option
AIt will restart cellphone, you can connect cable when cellphone is on home screen, it won't get moisture alert
But if you remove the cable it will come back, so you will have to go back to normal mode, do this to charge your device, then go back to normal mode through notifications
It's not permanent but better than breaking your head.