I've worked on small modern commercial vessels (80ft or so) and docked them, and it isn't easy, and watching larger ships such as a 200ft or so 98 GRT boat dock itself also looks like a very slow and careful process.
How did large ships accomplish the docking process during the age of sail? The only think I can imagine is sailing towards your dock as slow as possible and tossing a lot of lines to folks on land as soon as you're close enough, for them to pull you in.
But what about very windy days on which the wind might be throwing you against the dock really hard, or pushing you away with considerable force? Those large ships would be strongly affected by the wind even with no sails out.
In terms of a first-rate, you probably wouldn't be sailing into a "dock" per se. When large ships were snubbed up to a pier, or let into a dry dock, they would probably carry out this evolution by some combination of warping/kedging or being towed into a dock; you see many references to ships being warped alongside a pier, which is most certainly your "tossing a lot of lines to folks on land" and letting it be drawn in to the pier.