not important, but on reading the above (and having nothing better to do :-)
i got a question and some thoughts ... :-)
iterated (=sequentially) and random at the same time ?
could this (with really bad luck that i always have when RNG is involved) lead to one pair of provider/requester (or several that don't need or don't have items) being checked a million times (a million ticks) in a row and thus doing nothing at all for a while?
without looking at how it is currently done: what about a simple roundrobin for all requesters (1 second for every 60 requesters, 1 minute for a huge road network with 3600 requesters; maybe having a setting to choose how many requesters per tick), and for each of them that needs more items doing another roundrobin on all providers, possibly with a priority (additional value in the depot or signal attached to it) so that first all providers in one list for one priority are checked for enough items (again using simple roundrobin), if none found doing a roundrobin on the next list of providers with the next lower priority, etc ? this might increase the time for the script, but still keep it relatively low when no complicated distance calculations for each pair are needed all the time (no updates of the network needed to find shortest routes with lots of exact pathfinding to find which depots to pair).
or just the other way around: since requesters have a specific item set, one list of requesters per item type. then iterate (roundrobin) on all providers and for each item type with at least a full stack in them quickly find a requester in those shorter lists that needs those items.
also : instead of having priorities, simply build 2 or 3 providers at one location so that items from that station have more chances to be taken. being able to network (connect with wires) could also be helpful if that was available.
not perfect (no main station and a backup station only if main is empty), but maybe worth testing and exploring ...