Crazy that derailleurs are still a thing in 2020. Surely at some point it'll make more sense to use a motor/generator combination to transmit power from the crank to the rear wheel...
Tough to beat gears when it comes to efficiency.
https://www.cyclingabout.com/drivetrain-efficiency-difference-speed-between-1x-2x/
Motor-generaotrs have relatively narrow bands of efficient operation, and aren't going to be competitive in any of cost/weight/performance.
But chain-driven derailleurs are mechanically-annoying objects that require constant maintenance and really only work well the day they come back from the bike shop. Meanwhile, PM motor/generator efficiency can exceed 90%. (Yes, they would both need to be geared appropriately, but those gearsets could be lightweight sealed units.)
Note that I'm not asking for batteries, I just don't see why the pedals have to turn a chain drive instead of a generator that drives a motor in the wheel hub.
You're doing it wrong if derailleurs aren't working smoothly, sounds like the common complaint from people who have only ever used toy-store/"disposable" quality bikes and haven't ridden something built to last. When do I do maintenance on chain drives? When the chain has stretched and gets replaced, the rest of the time it just works. Want something even more robust? Internal geared hubs and belt drives are available (with a weight penalty).
The weight and cost kills an electric transmission, before any issues of efficiency. Efficiency which is not going to be peaking at 90% (citation needed!) over anything more than a tiny part of the operating envelope even for the best technology available (which won't be the lightest). The weight for a chain drive is:
https://weightweenies.starbike.com/listings.phpCassette 200g
Chainrings 150g
Chain 300g
Front Derailleur 100g
Rear Derailleur 200g
Shifters 250g
So the parts you can strip off total 1200g, for a transmission that carries peak powers up past 2000W and has very little flex or slip.
Swap out to a geared hub and its under 3000g. There is a reason beyond safety that most power steering still has a mechanical linkage between the driver and the road, substituting for a slipping/delayed drive (just as a loose chain would do) kills the connection and feel.
P.S. just the hub motor for a typical electric bicycle is 3kg, 3000g, before considering a generator, power electronics, and wiring.
Its that sort of thinking that ends up with toy bicycles that weigh 15-20kg but look nice and have all the marketing "check boxes".