I think that using ti_on_missile_hit with WSE features is an easy way to find the agent and checking if that agent have no ammo of that kind of throwing weapon, to remove that item from its inventory, or maybe a trigger that check in a interval if an itp_type_thrown item have 0 ammo.
"ti_on_missile_hit" is a warband trigger, not wse.
Checking the ammo when a missile hits isnt a good way.
If you throw something outside the map, then it will never hit, so the trigger has no effect.
Doing it with "ti_on_weapon_attack" will be the better solution.
So this will check the ammo every time you throw the missile.