Edit: Seems to be working now, not sure if it is exactly as intended though, but good enough for now.
I didn't know where put this because I'm not sure it is a bug or not so I thought I'd put in here so hopefully RoboB0b sees it.
I only just started using the restock threshold, but I noticed it doesn't work with containers, at least not crates so far.
I was hoping my single stockpile with a crate with the threshold set to 20 would mean when there was 12 items or less in the crate it would be restocked, but it is still being restocked with any number missing.
A fix/implementation of this would be greatly appreciated.