When sailing to the dock in a large boat (tons) the sail you use is determined by the wind direction. If, once you are berthed alongside the wind will be from ahead then use the main, if the wind will be from astern then use the jib. That way, you can luff the sail to slow down as you approach. If you are using the main with the wind from astern then the only way to depower the main is by dropping it or sheeting it flat (if you are lucky). Using the jib when the wind is from ahead is challenging because most boats won't sail to weather under jib alone very well.
That is my approach. In dinghys it isn't as big a deal, just grab the dock and stop the boat.
There is a tide in the affairs of men,
Which, taken at the flood, leads on to fortune;
Omitted, all the voyage of their life
Is bound in shallows and in miseries.
Shakespeare, Julius Caesar IV, iii, 217