There's also a sort-of-middle-ground here. There are trolleybusses which also have batteries, and can operate as regular busses where no overhead power is available. Basically you get continuous charge on parts of the route, while also being able to operate in other areas. Granted, this works for cities which already have trolleybus infrastructure in place.
With modern battery electric busses there is usually no need to charge while driving. Drivers need breaks, fast charging during the break time is enough. Fast charging infrastructure is much simpler to install and cheaper than overhead wires.