What is the regular maintenance on electric hubmotors?
I found no manufacturer supplied technical docs / how-to on bicycle hub motor (or mid-drive motor) maintenance. There is a variety of rider created how-to information. Here is a link to the Electric Bike forum as an example.

Quick explanations of electric bike motors:

There are three configurations for electric bikes. Two different types of hub motors and the mid-drive motor.


Geared hub motors - this hub has an internal gearing system = greater complexity, lower durability.
Direct Drive hub motors - no gears, just an electric motor = simpler
The linked article also talks about the good and bad of each type of drive, but it does not go into depth on durability and repair.
Mid-drive - connects to a bicycle drive train = harder to install than either hub motor.


According to this thread in the Electric Bike Review forum the answer on hub motor durability and maintenance is - it depends.

Durability depends on:


The quality of the hub (if you can't find parts for the hub avoid it or be ready to replace it when/if it breaks)
The type of riding you do (hills generate heat in an electric system which can reduce durability)
The conditions you ride in, wet, dusty, hot, etc.


In this conversation on reliability in the Electric Bike Review durability on hub motor testimonies go from as little as 2,000 to as much as 20,000 miles.  

The consensus is that a direct drive hub has greater durability than the gear hub. The wear items in the direct drive hub are the sealed cassette bearings. Replacing would be a matter of removing the old bearing(s) and installing new. The wear item in the geared hub are the bearings and the gears.  

Here is a site with a variety of direct drive motor parts - not as an endorsement of any kind but only for part cost reference.

Other things that can fail on a hub motor, or mid-drive system:


Battery
Controller
Phase wires - if the motor gets too hot
Hall-effect sensors - track the motor's position


A mid-drive motor installs replaces the crank spindle or bolts to the down tube.
Going with a mid-drive system uses standard bicycle drive train parts. This type of system can increase wear on the standard drive train parts.

To get something you can repair make sure you can find 1. Replacement parts 2. Online repair help or how to video, before you buy. To some extent, when it comes to durability electric bike owners are blazing a trail - they don't have the history of the conventional bike.