Step 1: Construct the Tileable 3-Block Comparator Slice
Build a 1-wide vertical slice: Top hopper points sideways into a Comparator. The comparator outputs into 2 redstone dust on top of solid blocks, running down into a redstone repeater facing a solid block that powers a redstone torch directly below the middle hopper.
Step 2: Lock the Filtering Hopper with the Redstone Torch
The redstone torch powers the hopper beneath your filter hopper, locking it in place so items cannot drain until the comparator detects a signal strength of 2 (triggered at exactly 42 items).
Step 3: Allocate the Unbreakable 41+1+1+1+1 Filter Slots
In the top filter hopper, place 41 of your desired sorting item in the far-left slot. In the remaining 4 slots, place 1 uniquely renamed stick or dirt block (e.g. 'Blocker_Key').
Step 4: Calculate Mega-Chest Drain Timings
A single hopper transfers 2.5 items per second (8 game ticks per item). To sort a double chest containing 3,456 items, allocate 23 minutes of continuous processing or install a dual-hopper hopper-minecart unloader to halve the duration to 11.5 minutes.