I agree with Rich, as he describes exactly how my 5411 diesel is plumbed on the exhaust side. My engine has never had a problem with back flow, so I have to assume that it is the Westerbeke cast aluminum exhaust elbow that fits between the exhaust riser pipe, & forms the gooseneck anti siphon section of the exhaust which then runs to the water muffler box. Perhaps your 5411 has a replacement exhaust riser & gooseneck built from standard threaded steel pipe, & does not have then Westerbeke elbow as described. This may be what you need to prevent the back flow. But if I recall the height of the water muffler box is well below the level of the exhaust riser, so I'm surprised that you are getting water backflow while heeling. Since the water muffler is slightly to port side, it must be when the boat is heeling over hard to starboard, that the water muffler is then raised higher then the exhaust riser to allow water to backflow.
Lastly, the only time that I had an unusual water backflow, was when I first bought our boat & a failed check valve that is built into the galley sink vent failed, & allowed raw water to pump up through the galley sink drain. It freaked me out because water was overflowing the sink drain & I thought I had a major leak on my hands. Turns out that this tiny little 1/4" diameter piece of rubber membrane with a pin hole in the center of it had failed causing raw cooling water to siphon up through this galley sink vent.
But I believe your problem will be cured by just extending the height of the exhaust riser & elbow a few inches to prevent water backflow when heeling, since as long as the riser is higher then water muffler it will prevent water intake.