I hope you'll talk to his doctor about the accidents. There's a possibility he doesn't know he has to go. Especially if he's ever been prone toward constipation, there's a very real possibility he's developed a condition called encopresis. This is when stool collects and hardens in the bowel, causing it to expand an become numb. Fresh stool, needing a way out, forces itself past the blockage, and causes accidents that the child can't tell are coming. The bowel can also press on the bladder, causing pee accidents.
Cold showers are awfully harsh. And punishment of any sort is harsh if your son really can't help it. I'd sure eliminate the possibility of a medical problem first, and then work with other causes, possibly emotional.
Does your son indicate that he really doesn't care that he's having these accidents, or does he seem uncomfortable about you finding out? I'd sure want to talk to him about what this means to him. There's almost always a reason for any kid behavior, and in my experience with many kids over a few decades, most reasons can be addressed without punishment. The very wise book How to Talk So Kids Will Listen, and Listen So Kids Will Talk is an excellent resource for helping kids open up about their issues, and also helping them participate in finding solutions to most common behavioral problems.