Check for corrosion around the the battery connector (on the motherboard) clean w/ 99% IPA, or perhaps ultrasonic cleaner, and if necessary, try reflowing connections in that area.
I have several water damaged s6 motherboards that reboot like you describe, somewhere there is a harware issue but I can not track it down.
However I have had some with corrosion around the battery connector on motherboard that I've been able to clean up and fully recover