A long time ago, I skippered a yacht—about 7 meters long—during a group student cruise involving several similarly sized yachts sailing from Gdańsk to the Vistula Lagoon (and back). We were navigating across the Vistula Delta, passing under small bridge spanning the canal.
The cruise commander (Zbigniew Szpetulski) taught us a technique for raising and lowering the mast from the bridge itself: people standing on the bridge would use lines to pull the mast out of its step and lower it onto the deck; then, after passing under the bridge, they would use the lines to lift it back up and seat it in the step.
There were plenty of us young guys, so we managed the crossing for each yacht in turn.