Speaking first hand, it's very unlikely that the key will shear to protect the shaft, strut or other engine components. Shear strength of brass is 34100 psi. A 3/16" key x 1" long will take almost 6400lbs of force to shear the key. A line will break, the strut or shaft will bend or the engine will stall before the key shears. Given that my key is .225", the force to shear the key is almost 7500lb. I bent the strut and shaft and the engine stalled when a line wrapped around the shaft Ugh. All is fixed and original key is still functioning.

The key is actually there to drive the shaft. The two square head bolts are there to keep the shaft from sliding out to the coupling.

Bob the probable cause of your key coming out at slow RPM's when shifting in and out of reverse at the dock is most likely that the coupling is loose on the shaft. At low RPM there would be very little load on the key. Shifting from forward to reverse can cause a slight back and forth rotational torquing of the coupling on the shaft. Add a little engine vibration, shaft wanting to move fore and aft depending on prop rotation and at some point the key moves. If the length of the key is shorter than the distance from the back of the coupling to the back radius of the keyway- the key will eventually fall out