I know of a case where the engine on a new Audi RS6 died, and Audi refused the warranty claim because a custom exhaust has been fitted, claiming that it affected the operation of the engine and destroyed it. The case went to court and Audi was unable to prove how a custom exhaust could cause the crankshaft to snap in the middle - and the court ordered them to pay for repair.
There's loads of nonsense around this, with dealership frequently telling customers that if they fit their own parts they lose the entire warranty - nope, that's just not the case at all. Using your own oil, filters, brake pads and other consumable items does not void your warranty as long as they are "equivalent" items. I even heard a dealership tell a customer once that fitting tyres without manufacturer approval(MO in this case) would void the warranty - I told them that if that's the case, why is their own parts department selling entire sets of them as "original Mercedes accessories" then. The truth is it's bullshit, that's just not how warranties work.
There just aren't many user serviceable components in a Tesla. It's basically a computer, a battery and an eletric motor with a body sat on top.
Individual components when modified will affect the system as a whole. For instance modifying the battery pack to supply a higher peak current will increase the max performance of the motor but did you void the warranty of the battery, the motor or both?