a legal motor that does not require maintenance
A properly designed and built motor will not require any maintenance - and there are many such motors for sale.
A motor that is badly treated, just like a bicycle that is badly treated, will be damaged and require repair or replacement.
Maintenance isn't really a part of any electric bicycle motors - failure may happen, but not maintenance.
Over a long time, a well made motor may wear it's bearings or gears out. If quality control is poor at the factory, or if the user abuses the motor, a motor may fail. These are unusual circumstances, uncommon, and may be avoided. This is not maintenance.
Choose a motor with a good record of reliability, from a manufacturer with a good record of quality control. Next, don't mount it so the cable is pointing up to avoid water being conducted into the motor, don't specify a motor that is too weak or outside it's specifications, don't leave openings for water to enter (disk rotor bolts for instance). Don't overdrive it, or overheat it (choose the motor for the application).
'Legal'. Choose a jurisdiction. Find out what 'legal' means in that jurisdiction, including how this is interpreted. Who checks, how do they check, get some examples of failures under these rules. This is not an attempt to sneak around the requirements - motors don't always fit neatly into someone's idea and there will be interpretation. Justin of Grin has rants on his pages about 'motor ratings' and he is correct. The same motor with the same voltage and amps will produce twice the power at twice the rpm. Power is torque multiplied by speed - there is no 'one number'.
Power is not a quantity - it is a rate. Energy delivered per unit of time.
So what is the requirement where you will use the bicycle, and how is it actually interpreted? If you put a meter on any EU legal 250W motor and use it up a hill, you will see readings approaching 1000W - but it will melt if you do this hour after hour. It won't melt if you feed it 250W hour after hour. As I mentioned above, Grin's All-Axle will over heat if given more than 250W at 100rpm, and can thus be classified as a 250W motor.
So, put in the effort of finding out what actual requirements you must meet - throwing together a number of off-hand comments from people who also don't know your situation won't get you a real answer.
But maintenance isn't a part of a bicycle electric motor. Quality is, but there's no ongoing maintenance. Save that for your brakes and chain and tires.