I may have a solution to this.
When you send a worker to gather lumber (whether it be with a right-click, manually casting Gather or even issuing an attack command), it will be ordered to "harvest." Once the worker collects the maximum amount of lumber it can carry or is manually sent to drop it off, it will be issued a "resumeharvest" order. After dropping off the lumber, it is automatically issued to "harvest" again.
I sort of half-tested this in my attempt to create a custom lumber resource system but I didn't get very far with it. Anyway you could check when a unit is issued to "resumeharvest" (or if it's issued a "smart" order on a Town Hall, Lumber Mill, etc.) and add a dummy ability to the worker, then have another check to see if a worker has the dummy ability when a unit is issued to "harvest." If so, you know that it dropped off the lumber and can remove the dummy ability. Voila!
My only possible concern is when a tree dies and the worker switches to another tree, or when it's sent to gather lumber after being ordered to resumeharvest but before making it to the drop-off building, but I can't test this at the moment. However this should be a good starting point.