Consider a gene that promotes compassion, selflessness and sharing. While it may lower your individual fitness, groups with some individuals with this gene may fare better as a whole.
Same as autism. For example, say autistic people see connections that other people don't. Having a low rate of "different thinkers" is positive for the group as a whole, even if the individuals may be disadvantaged in other ways.
This doesn't mean that any particular individual will have a higher rate (although most will).
One hypothesis for the spread of Christianity in the Roman Empire is that Christianity provided social services that improved reproductive rates by a couple of percentage points. Maintain that over a particularly stressful upheaval in the social order and you don't need many generations to significantly outbreed your rivals.
Social services, and perhaps this might have some impact:
"In 1968, Pope Paul VI issued his landmark encyclical letter Humanae Vitae (Latin, “Human Life”), which reemphasized the Church’s constant teaching that it is always intrinsically wrong to use contraception to prevent new human beings from coming into existence."
Not strictly autism, but sickle cell anemia is a disease caused by carrying two copies of a recessive gene. If you have two copies of the recessive gene, you suffer from a debilitating illness. If you carry one copy of the normal gene and one copy of the disease causing recessive version, you have increased resistance to malaria, which has killed more humans than everything else combined. So evolution definitely does contribute to the prevalence of sickle cell anemia. Almost everyone in the US we suffers from sickle cell anemia is of sun Saharan African descent, where malaria is especially relevant.
While autism certainly isn't as simple as sickle cell anemia, there does exist the possibility that genetic components which contribute to autism can also contribute to other, more positive traits with fewer risk factors.
Hmm... I hope someone more knowledgeable than me in biology jumps in to lend their thought, but I'm extremely skeptical of takes like this - another one I see a lot online is that somehow homosexuality has "evolutionary explanations." It doesn't jive with my understanding of how evolution works.
Statements like that seem to imply there is some sort of intelligent force or plan behind evolution, when instead it is "directed" by noise, not "reacting to" noise.
As far as I know there's no way for evolution to "sprinkled a bit of autism" across a population for an increased chance of population survival - I don't see how such a mechanism could exist.
That's not to say that autism doesn't somehow improve society or populations, maybe it does, I don't know. But I don't think we can point to evolution as the mechanism.