I heard we tried that in some German Cities way back in the 80ies or even late 70ies, but the technology wasn't that far yet and the overhead cables would get damaged when the buses engaged them, sometimes leading to complete outages of the tram network, and as such it was scrapped again. Glad to see that other places took it on later, we could really need that right now.
Trolley Buses are over 100 years old as a technology. They were super wide-spread in the entire eastern block and now cities in hungary, the czech republic and romania introduce a lot of newer (better) models: For example, Skoda has one that can easily integrate with exsisting tram infrastructure and has batteries to bridge smaller distances in places where there are no overhead lines.
They're also fairly popular in China! When I was visiting family in Shanghai, a sizeable chunk of the bus service consisted of electric trolley busses.