It's not exactly my idea and on CES2017 there was a bike that could do that.
The idea is to add possibility to reverse engine from assistance to actually generate resistance for the rider.
It should not be that hard to implement and it opens new possibilities...
Imagine that at home you can turn on interval training and ride the bike on the stand or just train outside on the flat terrain like you would rode in the mountains.
I know that kind of denies e-bike idea but it would be a great addition during the winter when you'd like to still enjoy your Nireeka at home.