Lovely though this theory is (I know it appeals to lots of people) this is actually quite unlikely. The same gets said about ADHD. But there are plenty of genetically inherited tendencies which are not necessarily advantageous from a POV of survival, such as poor eyesight, being born deaf, or conditions which exist on a recessive gene line like Cystic Fibrosis (a lung disease) or Hemophilia (blood does not clot). Natural selection is not really something which actively looks for the best traits for survival, it's more the other way around, that anyone with a trait which makes them more likely to die before they can reproduce is less likely to pass on their genes.
There are also lots of things which are basically irrelevant to your chances of survival which are passed on genetically, such as hair/eye colour, and small things which can "go wrong" during the passing on of DNA and genetics - I went to school with a boy who was born with 6 fingers on one hand. The extra finger was removed in an operation when he was a toddler. One of my sons was born with hypospadias - his urethra is positioned slightly differently on the penis making his foreskin look different, although everything works fine. These kinds of things happen all the time (nobody in either of our families has hypospadias) and are generally put down to minor genetic mutations. More significant genetic mutations either in the egg or sperm most likely cause an embryo/zygote to be rejected by the body either before implantation (ie, a period) or after implantation (ie, a miscarriage), and this happens more as people get older. That's what I understood from a lot of reading I did about genetics/fertility after having 2 early miscarriages myself. Apparently about 80-90% of the time you have sex within your fertile period, the egg will be fertilised, but then the vast majority of these get rejected by the woman's body before it even implants, which is why any fertile cycle has roughly a 20% chance of successful conception.
It seems that a lot of the genes involved in neurodivergent conditions are essentially recessive, as in a person can have several markers for autism/ADHD but not actually have an autism/ADHD diagnosis themselves, they don't meet criteria. Then if you have more, you might have more extreme symptoms and meet the criteria. This is part of why it's common that some people in a family have autism/ADHD and some people in the family don't.
Autism and ADHD are rare enough that they probably aren't something which natural selection is selecting for. Remember that a certain amount of genetic diversity is also advantageous because if our gene pool gets too small, that also creates problems (ie inbreeding). So natural selection is not really screening out smaller differences like hair colour, ND conditions, extra fingers, skill propensities and so on.
There are also de novo (new mutation) cases of many of the genetic markers we have found, and we haven't found all of the genetic markers yet.
If anything, I would imagine that ADHD/ASD would have a very slight propensity towards dying before reproduction because of the higher chance of accidents particularly in young children. And some autistic people would not be obsessive about keeping a fire going but rather be fascinated by the fire and unable to understand that it will hurt them.
But in the majority, it is more likely that these are simply genetic traits which are not "bad enough" to get screened out by natural selection, and/or so prolific that they continue despite the effects of natural selection because enough of the related genetic material was passed on.
I do agree with the sentiment that neurodiversity can be beneficial in society and in general, we should work with and celebrate people's unique strengths rather than trying to catalogue weaknesses, although I think the cataloguing of weaknesses so they can be supported is also helpful, so I'm going to be annoying and sit on a fence there!