Use a data recovery tool, if the phone can be detected by the computer, such softwares can recover data from it, recover data from water damaged phone.
To wipe all data from your iphone, you can use an iOS data eraser tool, it would completely delete all data from your iphone, especailly when you sell your phone or give it to others.