I thought about it some more and I don't really like any of the options I found. There is no event on wares taken from a house, so the only way to do this would be using OnTick all the time. There are too many possible house IDs, so they have to be stored in an array that would have to be searched all the time (making an array with indexes equivalent to the house IDs is impossible). Each player having a different array seems like a good idea and for all practical purposes, checking the houses something like every 2 seconds is fine. Tying wares and house IDs could be useful for weapon production because of multiple possible products.
Also, I imagined the global counter for addition more like true/false, where if false, OnWareProduced would change it to true, if true, the script would work and change it to false. Adding wares by HouseAddWaresTo would change it to false as well.
My main concern with this approach is searching. OnWareProduced would need counters associated with the house ID and that would mean checking half the existing house IDs on average every time a house produces something or something is added to it. Also, major traffic jams or insufficient serfs could significantly increase the number of OnWareProduced calls when too many houses produce more than 1 item at once, because the houses can be producing when already full and call OnWareProduced with every item taken. I don't know how fast/slow it would be without testing, might try it later.
Edit:
I looked into it and made a script for r10240 (not compatible with r6720 and unknown compatibility with later releases). Unless something major changes with Actions.OnWareProduced procedure, it hopefully won't stop working. There are probably some forgotten no longer used variables etc. but it seems, that it can reliably change the amount of wares houses produce. Performance doesn't seem that bad, 1 player with a smallish town could run on x10 speed without slowdowns. A scenario of several big cities is untested and might not perform very well. If someone wants to look at it, there's a link:
https://pastebin.com/7U75NqG8