Well... you could have a script that removes a primary weapon from the unit whenever he picks one up:
#loop
? (primaryweapon _this) != "" : _this removeweapon primaryweapon _this
~1
? alive _this : goto "loop"
exit
But you can't actually prevent the unit from picking up a weapon via the action, aside from making an addon that has no primary weapon slot. Another alternative would be to delete a unit's primary weapon when he is killed.