I had the parking brake cable break on 84 GMC 3/4 crew cab once, just as I was driving the boat onto the trailer. I put the boat in gear to push on the trailer and jumped out and got in the truck before it rolled in. I had left it running in neutral, so the only thing holding was the parking brake.
I still use the same truck but now with a 23ft walkaround (it tows 10X better than my 2018 Ram quad cab with the Hemi) but now I crank the wheel all the way to one side, so that the back of the truck will go toward the dock if the truck moves, shut off the engine, and leave it in gear. Still get a bit of a pucker each time but I think that doing it that way is about as safe as any truck on the ramp.