Personal take would be cool for possible one handed operation or maybe stick/mount to a bike somehow would be great.
Fumbling around in my bag felt clumsy and awkward (let alone slightly dangerous bc I looked down some).
Some of the other dispenser ideas are good but one thump on the road at the wrong time and a ride could go from “yay replenishment” to “better embrace the suck that’s about to happen”
minor suggestion to stay away from open slotted - sweat from back could get into things in jersey pocket; otherwise it would necessitate a baggie (perhaps an application, but not for the group ride/race one).
Line the pills up in the order you will take them on a piece of saran wrap and roll em up like sushi. Twist the ends. Stick in your jersey. When it’s time, pull each pill out with your mouth like it was a pack of mentos.
I used to use the Hammer Dispenser during my running days. It’s a flexible soft plastic that kept most moisture out. Good for small tablets. I kept it in my sweaty running shorts keys pocket so it would also work in a sweaty jersey pocket. But I don’t think it would be easy to use one handed.