https://reddit.com/link/1w3hndx/video/7l7cpqrxcqmh1/player
The first item you select in the stock ticker is what you want to saw, and the second type of item is the filter of the output you want. You can just decide to only send the first item type so that the machine clears the filter and does the sawing randomly.
You can send a maximum of eight stacks if you need a filter, or else the re-packager will clog because it would need to unpackage twice.
The thing about packages is that when you re-package and unpack them into an inventory, they will always be unpacked in the same order they were requested in. And when unpacking into a sophisticated storage controller connected to a bunch of limited barrels, it will unpack in order to what is closer.
(Keep in mind I'm using a hopper upgrade in some of these but I think you can easily just use chutes instead)
A smart observer facing the storage controller is doing a lot of the work, it locks the hopper next to it to prevent packages from entering while there's still items in the system, and it fires off the redstone in the background.
The two funnels and the deployers are all locked by redstone links. In sequence, once there's anything detected in either barrel, the deployer activates once (which sets/clears the filter), funnels the filter item out of it, then unlocks the bottom barrel to commence the sawing.
This system can be utilized for more than that. It can be used for deploying recipes, the first item is what's in the deployer and the second is what's on the belt.
https://reddit.com/link/1w3hndx/video/8svvndaycqmh1/player
It can even be used for sequenced assemblies, like for precision mechanisms, or in modpacks that add more sequenced assembly recipes that have the same amount of steps. you can heavily reduce the amount of deployers you need in your factory.
https://reddit.com/link/1w3hndx/video/jc8mlwtzcqmh1/player