Moisture warning in S or A phones using a C or B connector.
If you are adamant your phone has not come into contact with moisture it is probably dirt on the charging contacts. These ports are really small but this is what I used.
100 x 2mm cable tie
2mm strip of kitchen towel
Carefully glue the towel strip to both sides of the fine pointy end of the cable tie,
let it dry. Dip it in the isopropyl, carefully clean the contacts in the port without disturbing the centre prong or leaving any paper in it. Let it dry before plugging in to charger.
I can't be responsible for stupidity or no skills. but it certainly works for me.
Having spoken to Samsung UK I went through all the checklist with this fault and only the dreaded factory reset fixed the fault. Now I can plug my phone into my laptop and car usb ports and not get the error. Let's hope it doesn't repeat the fault!