I’d say even something “as simple” as stacking them up to the amount required to upgrade them to the next tier (3 for non-perfect gems and low/mid runes, 2 for high runes, 3 for 2-slot keys) would already be a massive improvement. It allows stacking for upgrades all rune types with 33 slots, and divides by 2 or 3 the amount of space required for gems and runes kept for other recipes.
I’d say stacks of 10 or 20 would be the ideal compromise between making stacking extremely efficient for regular players (that allows you to keep a little bit of every type of gem, rune, 2-slot key, essence, token, and monster body part in a single tab : 82 slots, and still keep large amounts of some of them within that same tab), while not making it trivial for people that are hoarding stuff from multiple automated accounts or playing the trading game rather than actually looking for stuff themselves.
I’ll add that whether it’s through stacking in a dedicated tab, stacking in normal stash tabs, or stacking in inventory too, any solution that the devs actually implement is better than a theoretically more efficient solution that the devs don’t actually implement.
Finally, I really don’t understand why the devs don’t massively increase the available number of stash tabs in offline. I can see my shared stash file is barely a couple of kilobytes, so it wouldn’t be unreasonable to multiply stash size by a hundred times. If there are loading times worries, just add 10 private stash tabs to each character, that way characters can keep everything they need in their own tabs, and very few mules are required.