A "virtual container", I think you're aiming at? (Like a Bin/Sack/Barrel/Barrel-of-Sacks for things that can't be put in a bin, sack or (as dry goods) barrel.)
There's been a problem getting
previously stacked items (coins, bolts) to restack. I think the main problem is that "Stack of X Foo" as a unit knows that each Foo is identical, but reassembling a split stack
might feature differently qualitied Foos from different original stacks (so needs to know "Stack of X Masterwork Glumprong Foo Plus Y Standard Featherwood Foo", or likely far more complicated) which demands more complex handling.
Either the virtual-container can solve the ammo problem (still have old 'stacks' but restack into a "pile"-like VC, which you can make Last In First Out under most circumstances, perhaps special jobs can sort through to redistribute/remix varied stacks back into homogeneous ones again?) or the ammo problem reveals a data issue that would also cause pile-problems too. This side of a rewrite.
Additionally, I think bulk goods that can't be Bin-stored/etc might be
intended to be non-stackable, as a 'reality' element. One unit of logs/rocks[1] can
fill a tile. Somehow, possibly (re)constructed as a flat/box/3d-cross structure that works to stop even liquids in all orthagonal directions. QSPs might be the reluctant exception[2], and easy (unmodded) log-store compression might not be desired from a game POV.
First thoughts only. I'm sure there's (related) suggestions around this from the past, but I'm just making sure you get at least one reply, as you piqued my interest. (And I have absolutely no authority over this issue, nor the encyclopedic knowledge others may have about it!)
[1] Or one unit of blocks, which can be ¼ of the original in the case of stone; but then these are also binnable, to confuse the actual intent.
[2] Wasn't there something in the recent DFTalk about piles of material, perhaps acting more like heaps?