Sorry to hear you took it back. Sounds very unlucky to have that many issues.
My 2019 M3P has (touch wood) been fine - apart from a few minor issues in the initial couple of months of receiving it.
- Paint mark, passanger side. Fixed.
- Rear light housings filling with condensation. Replaced.
- Computer screen replaced after random morning start-up black screen of death. (Two button reboot sorted it during the problem though).
- Squeeky front right wheel area. Resolved at service centre.
There was an interview with Elon and Munro where he did state that there was issues on the initial ramp-up of production.
Youtube video:
Elon Musk Interview: 1-on-1 with Sandy Munro
Elon 'took us a while to iron out the production process, especially during a production ramp'. Like he said, maybe you were unlucky in terms of getting a vechicle during this critical time? Still, this really isn't acceptable for the end product you received. Hopefully you can give them another chance.