The best thing trolleybuses have going for them is their relatively low dependence on rare earth elements in production in contrast with BEV buses with their large batteries. Trolleybuses environmental toll is way smaller and it makes producers and operators way less dependent on third world countries devastating the environment with slave labor.
There's also the centralization advantage and long lifespan. Centralized power generation is nearly always most efficient, and EV batteries degrade relatively quickly, while there are real life examples of 30 year old trolleybuses still operating fine.
Those 30 year old trolleybuses die when power dies, but even semi modern ones (aka 15-10 year olds) can still have diesel backup. New ones always have battery backup.
That's true but still those batteries are significantly smaller than those of BEV buses - usually trolleybuses with batteries have 5-15km of range compared to 200-350 km of equivalent BEV buses which also means that the trolleybuses are significantly lighter than BEV buses, which helps with efficiency of electricity utilisation. Another efficiency factor is that not having to charge and deplete a huge battery will save quite significant ammnount of power that is lost as heat during battery operation.
Hurr duurr rareearth . Written from your phone with rare earth materials, tomorrow you're going to drive to work using rare earth to work on your laptop with rare earth materials.
Neither batteries nor drive train components of bevs HAVE to use rare earth. There's tons of cars without them (bmw electric cars for example).
If you even respond, please include a modern car which does not contain ANY rare earth material and does not use electricity for energy storage.
Nothing is black and white you know. No decision is 100% good or 100% bad, we live in a sepectrum where some decisions may be less bad than others and that is the point.
Also current batteries will use cobalt or lithium, other options are either not efficient enough (like metal hydride or sulphuric acid batteries) or developed enough - solid state batteries, or LiFePo.
Also current BMW BEVs are still using lithium based batteries, whose mining pretty much is environmental disaster as a process.