This phenomenon is called "bus bunching". My friends, two profs from Georgia Tech and UChicago, came up with one solution for it. They wrote a paper about their solution[1], and then built a startup that has successfully implemented it at a bunch of places[2].
Looking at the second link, it seems they implement it by having the buses pause at certain points. Does it do that with riders onboard? That seems like it could be a deterioration in experience for those riders that are on the bus pausing.
I guess the reality is, as a passenger, you either wait several minutes on the bus at a stop mid-route. Or you wait much longer at a bus stop in a crowd waiting for four buses to show up.
When possible, they pick "control points" at places where there are usually no passengers on board — for example, the ends of a linear route, or the bus depot.
But otherwise, they have a bunch of optimizations to spread the pauses out so they aren't too jarring. They also display the timer prominently so that riders are aware of what's going on.
In practice, riders seem happy with the tradeoff, since it has resulted in overall lower times to get from point A to point B.
[1]: [A self-coördinating bus route to resist bus bunching](https://doi.org/10.1016%2Fj.trb.2011.11.001)
[2]: [NAU’s new bus system makes for shorter wait times for riders](https://news.nau.edu/nau-bus-schedules/)