The world’s largest electric-vehicle manufacturer has had repeated run-ins with federal safety regulators, whom Musk calls the fun police. These have included flaws related to rear-view cameras, bonnet latches, seat-belt reminders and the sound-system software.