How did tot,
A measure of spirits, especially rum.
get that meaning?
It seems to have come to mean a specific ration, as in the daily tot of rum given to a sailor in the Royal Navy (well, no longer daily; see Black Tot Day).
This is in almost complete opposition to the idea of a total, though I can see how perhaps you could tot up the tots to make a whole. Other possibilities might be an association with the small child meaning of tot (something tiny) or totter (stumbling).
(I'm also curious about teetotal, but it looks as though it came later, so it's unlikely to be a source for this meaning.)