To expand on what thetrooper says:
1) stop loaded "boat 1" on top of empty "boat 2"
2) wake transported
3) load--if boat 1 is fully loaded the unit automatically will go onto boat 2, otherwise you'll need to tell it which boat to board--subsequent units you need to tell which boat anyway.
4) when all units are transferred, move boat 2 on to meet boat 3, or to port or whatever
I think it is generally viewed as a minor exploit, since you have to work for your reward. I had a 4-galleon ship chain operating from time to time in my current game, and it saved my hide a couple of times.
Helpful hint: rename your boats.
edit: I see that thetrooper has provided a link.