If we can be unusually organised after a session in Ballonnetje, the last viable tram departs Artis (which is about 10 minutes walk from Ballonnetje) at 16:52 arriving at Dam at 17:01. It's about another 10 minute walk from there to the boat.
Synchronise your phones! I'm now imagining alarms going off on every phone in the coffeeshop.
Incidentally, I've also noticed that it's a 20 minute ride to The Stud. So after 4.20, even if we caught the 16:35 (realistically unlikely!) from Dam arriving Molukkenstraat at 16:54 we'd probably still be late for our 5pm appointment. Fortunately the coffeeshop won't sail off without us
It's a couple of blocks from Molukkenstraat to Stud. There is a bus stop right outside Stud called Valentijnkade. Bus 40 from Molukkenstraat departs at the same time as the tram arrives and the stop is on the opposite side of the crossroads so we're more likely to get run over by the bus than catch it! We could swap tram 14 for bus 65 at Javaplein. Tram arrives 16:52, bus departs 16:53.
That suggests another idea. If we have no boat after Stud then we could consider a couple of shops on our way back into town. For instance, bus 65 to Javaplein which is between Best Friends and Warda. Then tram 14 to the windmill where there are 3 more shops including Happy People. Just a thought.