If you truly wear one out, you can usually get a manufacturer or third-party rebuild of most motors as long as the electronics (Boards & chips) haven't crapped out. At least to get you 5-10 years out of a bike. After that, these models really are going to be somewhat disposable as the battery and controllers aren't being made to an industry standard quite yet, and the tech won't be even close in 10 years (just look back 10 years ago). L-ion/po batteries just aren't rebuildable the same way old cells were, so battery replacement will be tougher and tougher, and very few of use will be able to milk more than 8-10 years out of a battery.
There may be some third party niche parts and rebuild markets that evolve to fill a gap if the patents permit, but it's probably fair to assume that most won't be on the road and functional as new in 15+ years, unlike our old conventional bikes. US patents for example don't expire for 20 years, and they probably won't justify a parts market at that age. Time will tell...