That's just regenerative braking on a bike. Without batteries.
In theory that idea isn't actually bad although I suspect in practise the mechanism would be extremely complicated and would be liable to jamming it in opportune moments. That said doing this electronically is already a thing, although not really in e-bikes.