A few of the challenges: - which parts to produce and when - how many - how to ensure there is stock everywhere (shipping is not an option on a large market, as it is too costly) - how to make sure everybody knows how to mount the part - how to guarantee that your official spare parts are used
Saying it is "hard to keep up with the demand" is a marketing way of saying "we are not good at manufacturing".
Like software, it is easier to design the right car than fixing it after. But fixing defects or accidents is a necessity that no good design can prevent.
And at least with mechanical parts, there is always the option of third parties making parts. Its quite a different story when talking custom chips and firmware.
Consider the humble window wiper. More often than not these days it is not mechanical, but a electric motor driven by a chip hooked up to the CAN bus.
Similarly the central door locking and electric windows are likely to be on a single card pr door hooked up to CAN and an electric wire (the one in the driver side door being a bit more elaborate as it has controls for all the doors).
Ensuring that people get competent service and a good experience one step removed, remotely, is hard. That could be helped by fostering a customer culture of "do it yourself" then super-enabling customers and local service providers with great access to information, along with good logistics/fulfillment.
I'd be really nervous about letting someone work near 400V/1500A that wasn't trained to understand how to safely operate in that type of environment.
Reliably getting parts to a shop in days could be tough. Reliably doing it in weeks shouldn't be. That these repairs take so long tells me that they have no stock, and sit on their hands for a long time before making any.
But aren't there laws that protect and allow for aftermarket parts to be manufactured and sold by others? If there are alternatives to OEM parts, consumers aren't trapped my OEM production decisions, as long as there's enough demand.
This is definitely something Tesla needs to fix and soon. It shouldn't be hard, so either I'm missing something or they're doing as you describe in (2) and prioritizing new production over spares.