Another post about making a perpetual motion e-bike machine. There should be a sticky in this section that explains 8th grade level physics for those who don't understand them.
On the other hand there is something on e-bikes known as "regenerative braking" that if you live in very hilly country and often have to use your brakes on the down-hill side to keep from going too fast and getting out of control could be useful. It is only available with direct drive hub motors or fixed chain drive motors where the motor is always spinning when the wheel is spinning and there is no freewheeling action. Due to efficiency and other losses you won't ever even get close to half of what it took to climb the hill back on the down-hill run using regenerative braking, but you will get something back and it will save wear and tear on your brakes. I personally prefer to use a mid-drive which does not have re-gen. braking capability but because of the better climbing efficiency I come out just as good or better.