Tesla makes their own motors.
Motor replacement for the early production Model S cars wasn't unusual, as Tesla refined the design and manufacturing.
Our 2012 S P85 had the motor replaced twice - due to excessive "balloon" noise during acceleration. After the last replacement, they had corrected the issue - and the motor operated fine with acceptable sound.
Unlike replacing an ICE motor (which is a big deal, due to all of the connections), replacing a Tesla motor (or the battery pack) is relatively simple.
The motors are designed for long life, and with the 8 year unlimited mile warranty, there shouldn't be any concerns about vehicles with motor replacements.
If it was an ICE, that would be a completely different matter...