Yes, but also we've gotten better at diagnosis. Both things are likely true to varying degrees.
That said, Elon is one of the most obviously autistic people I've ever seen. He's not a great example of overdiagnosis. In fact, if autism hadn't already been discovered they'd have taken one look at him and invented Elontism.