This is why you have tickets or transit tokens. You can buy one on the bus/train, but then it costs 30% more and so nobody does that. Then you can buy a token using any payment method you like, whenever you like. Buy them from a vending machine at the train station with cash, order a month's worth on your credit card and have them shipped to your home, whatever you prefer.
Dropping an exact value coin into a machine is a solved problem, is reliable, instantaneous, has automatic redundancy in high volume locations because there will be multiple machines, protects privacy, etc.
> The agency then has to have staff to count the cash, then hire an armored car to take it to a bank. It's not that simple.
That is not a significant cost. The service is paid a small amount of money to collect a much larger amount of money, and if you do more frequent pickups then less security is required and the ratio stays low.
Meanwhile with cash you don't have to deal with chargebacks, computer intrusions, processing fees, etc.