Iv had the exact same thing happen twice now. The last phone I had on contract and same thing, says moisture detected and doesn't charge. After a long and painful process with my old service provider I ended up cancelling my contract and sending the phone back to them.
I then proceded to buy my own phone and get a SIM only contract. Not even a month later I'm experiencing the same problem with this one too. Both phones have never been anywhere near water or moisture. I'm getting very frustrated and annoyed now as I have been a Samsung customer for a few years now and had every galaxy model from the s3 onwards. Just seems Samsung aren't even addressing this obvious fault and making us the consumer think it is somehow our fault.
Mine was fine for about 6 month's then since jan I have had the moisture icon. I called Samsung who told me I had to take it to a service centre. My local one is over 30 miles away and I don't drive.
So they said they could organise a courier, the phone is under 12 months old but Samsung said they will repair it free of charge it's it's a software fault any hardware fault I need to pay for ??? The phone was fine until about a month ago. It's not been near water or anything. They only way I can get it to charge is restart the phone, once the s8 icon pops up plug the charger in... It's a joke....
I tried every single trick in the book for this problem. They were all just work arounds not fixes.
The problem is an over sensitive moisture detector inside the usb connector inside the phone. Samsung service centre replaced usb module free under waranty. It took only 2 hours to get it back. Now it works great again.