My dog likes to swim, which she has the good sense to do with her mouth shut. But what she really loves is to run fast in chest-high water chasing her splashes and trying to eat them and the surface of the water as she runs. As a result, she ingests/inhales some water and does a fair amount of coughing. I do some cupping—cup my hands and whack both sides of her rib cage to help—but as soon as I let her go she gallops back into the water and repeats.
I keep her out of ponds and stagnant water and take her to fast moving streams with shale bottoms (her fav) and gently coursing rivers to avoid stagnant water cooties. I hate to deny her such joy, especially when it’s so hot and she can’t do much else outside, but I don’t want to make her sick, either. It’s been so long since I had a dog who likes water, I don’t remember how much coughing is par for the course. I would say my dog’s is more than incidental.