Are you getting this all the time, no matter where you are charging? Or does it happen only happen while in a vehicle?
Reason I ask is because while visiting my sister in TX earlier this summer, I'd get that message quite often while driving in my car, but nowhere else. My dash mount places the bottom of my phone really close to one of the ac vents and I believe that because I was running my ac constantly and at its coldest possible temp (because TX is effing hot) there was just enough moisture buildup in the charging port to set it off.
I've never gotten that message before or since that TX trip and it was only in my vehicle. So if you're trying to charge close to a cold air source, maybe that's your issue.