Last time I automated an industrial electrolyzer (and the centrifuge, which had the exact same issue), I also thought long and hard about this and finally concluded that there is no other way beyond a RP2 sorting machine pulling specific amounts from a chest. I literally tried six or seven different methods, one more obscure than the next, and nothing worked without errors except this one. It's also one of the more compact setups, just requiring four blocks (inline filter for input from tube network -> buffer chest -> sorter to control amounts -> electrolyzer).
Now, I did not have AE back then.
If I had had it, I would definitely have tried placing a ME interface on top of the electrolyzer and feeding it crafting patters for all the stuff the electrolyzer can handle; for example, one pattern for "Ruby Dust x9 = Chrome Dust x1". Then I just need to have an export bus somewhere in the ME network pointing back into the ME network (for example, point it at a ME interface, maybe even the same you're using on the electrolyzer) that is constantly making requests for chrome dust. This will trigger the ME interface and make it dump ruby dust into the electrolyzer. Do this with as many pattern slots as the interface has room for, and the ME network will attempt to auto-process all these things.
Unfortunately my experience so far with the ME interface is that it will happily insert partial amounts, and those partial amounts will keep sitting in the electrolyzer until more enters the system. You could potentially get unpredictable backlogs with this. Once again, the RP2 sorter is the superior option.
You could, of course, combine the two methods. Instead of a buffer chest, go ME interface -> sorting machine -> electrolyzer. Then tell the interface to export all those items you want electrolyzed. Unfortunately you still need the sorter and can't rely on a filter, because while you can tell the interface to always keep 9 ruby dust exported, you will still end up with partial amounts again when you run out of ruby dust. So there's no way around the sorter as a hard limiter on transferred amounts. But with only 3 blocks, that is the most compact solution yet, and it draws directly from the ME storage network.