If used correctly trolleybuses are far from obselete.
In-Motion-Charging (IMC) is in many cases the simplest and most efficient way to reduce bus emissions in cities - you have the advantage of fully electric operation with no restrictions on charging time and range whilst avoiding the enormous weight of a large battery that is otherwise needed.
The infrastructure costs are slightly higher, but when you have more than about 8 buses per hour running on a section of route that pays for itself (trolleybuses are cheaper and last longer than battery and diesel buses - for the former simply because far fewer of them are needed to run the same service ). They are also significantly quieter than diesel buses and have better acceleration and braking performance (particulates are lower than a diesel bus because almost all braking is regenerative nowadays)
If space permits trolleybuses can be biarticulated (bendy busses with two bends) significantly increasing capacity (this can be done in theory with diesel buses but the result is generally heavy and underpowered)
There is no longer any need for overhead wires that are anything but plain line (and thus relatively unobtrusive) - as the vast majority of complex junctions in the wiring can be avoided using the battery. The trolley poles themselves have been improved significantly as well, meaning dewirements are far less likely, and when switching from the battery to the wires, they can (given a simple triangular guide at the right place) reattach themselves to the wires automatically.
There seems to be an aversion in the UK to new trolleybus networks - the expertise is no longer there, but for the cities in Europe that use (and maintain) them they work in extremely well. These include Zürich, Geneva, Bern, Luzern, Salzburg, Rome, Solingen, Essen, Wuppertal and many others.
London would benefit massively were they to be reintroduced on the most frequently served corridors - the photo above shows the new routemasters could be converted into trolleybuses fairly easily by fitting poles and replacing the diesel motor with a battery.