I've rarely seen an eBike with motor problems. The cheaper mfrs. will sometimes have controller problems.
If you buy from a bike shop that makes a known line of bikes, they and the mfr. will take care of you. The higher volume the manufacturer, the quicker they will sort things out.
I've had half a dozen eBikes, most of them what you'd call inexpensive, and never a motor problem. Here are all my eBikes and
the problems I've had with them:
- heybike Ranger, Amazon folding eFatty. Loudly-screeching brakes, customer service was responsive but unhelpful. No other problems.
- Lectric XP Lite. ("lightweight" folding single speed) QR front skewer sometimes moves a bit, causing slight disc brake dragging. Quiet and torquey, for its humble spec.
- Aventon Level.2. (commuter) No problems. Its hub motor is always audible when on, probably has metal planet gears in the hub motor. Customer service was curt but helpful and responsive.
- Reid Tracker 2. (eFatty) Torque sensor is not as responsive as I'd like, but no major problems.
- Tern Vektron S10. (folding cargo eBike) No problems.
- Electra Townie GO! 7D, (Beach cruiser) no problems. Its Hyena motor is the quietest in our fleet.
- Yamaha Wabash RT. (Gravel bike) Electronics kept shutting down. Two trips back to the shop 70 miles away and they fixed it by over-tightening the battery to the point where it was nearly impossible to remove. Motor was really loud, but powerful and well-sorted.
- Ride1UP Portola (Folding budget-friendly eBike). Instructions didn't match electronics firmware re. unlocking Class 3 mode. However, Ride1UP was responsive and helpful when I emailed them and it was sorted within two days.
- Juiced HyperScrambler 2. (eMoped) No problems.
So, in answer to your original question, none of my 9 eBikes I've owned had motor problems, and only 3 of them were what I'd call expensive.
I wouldn't buy a Yamaha or heybike again, but motors are the least of your concern, in my experience. You seem to be looking at "bike shop brands", so make sure you have good brakes and that the electronics are reliable. The shop should help in case of electronics issues.