Ive gone into the river a couple of times while wearing my handguns. Its really not that big a deal. If it was in a fanny pack, unless you went for an extended swim, I cant imagine it really got much more than just "wet".
Mine were always in my daily carry holster, and each time I was in the water everything I had on was well soaked, including the gun and its mags. Once back on shore, I would just shake everything out, and deal with it later that night when we camped. A couple of times, when the river was really muddy, I did rinse the gun out well in a "clearer" side stream, trying to get any grit out that might have settled in.
Once we made camp for the night, Id strip the gun and clean it the best as I could, and give everything a blast of WD40 prior to reassembly. I always keep one of those little cans (about the size of a small pepper spray can) in my ditty bag, for just such an emergency.
Once I got home, Id strip the gun and give it a better cleaning, and usually another blast of WD 40 into the internals and shake it out.
I know a lot of people go off about WD40, but I used it for decades when it was really all that was available, and never once had any of these problems youre supposed to have with it.
I think the problems come in, like as with anything else, when people go way overboard with it, and dont apply it properly. I also think a lot of what you hear about it, is just internet BS being passed on and on.
If youre wearing a gun around on the water, WD40 and a good lanyard are two things you want to have.