You can track the units' orders. When their last order was to right click the tower and they are close to the tower, they will be loaded into the tower. I would do it only virtually without actually using any loading. Just hide the unit and change the tower's multishot ability level (barrage). I think there were some problems with attacking only 2 units, but I don't know. There are also multishot systems on the hive.
When you want to unload, you need to find an event the user can do to unload them. For example clicking the tower, selecting the tower and pressing excape, chat message, escape.
You could also make a second hero, so by pressing f2 you unload, or creating button units close to the tower and by selecting them unload.
Whatever you can be creative here.