One end of usb cable got wet while still plugged into an outlet I have a galaxy s7 edge phone. The usb cable for charging, the end that plugs into the phone (I think it's called a connector) got sticky due to some food. I used an antibacterial liquid to clean it. Unfortunately I noticed too late that the other end is still plugged in to an outlet because I felt some electricity through the end. I panicked and quickly dried the end that plugs to the phone. After drying, I Immediately plugged in my phone. It charged without any problems.

Given what happened, is my phone and my usb cable still safe from harm?
I don't think you can get a definitive answer but I would strongly  recommend using not using that cable any more

Reason being that the food matter and the anti bacterial liquid may have seeped a wee bit into the cable or form some conductance between the pins. Drying out fully is not easy unless you had used rubbing alcohol (isopropyl alcohol) which is generally recommended.

The fact that it is working fine now is no guarantee that you won't have a problem in future and replacing the cable is a small price to pay

Also see How to physically clean a USB connector safely from our SE.Superuser

Edit I was Googling and found this link from Samsung that suggests it's fine if you don't get a moisture warning so you could take a chance and replace the cable earliest