although the word "autism" wasn't used, it appears that the dis order was known in , at least, the early 1800s.
https://beyondthespectrummovie.com/a-history-of-autism/
see also here, autism in the mid 1800s
https://www.smithsonianmag.com/science-nature/early-history-autism-america-180957684/
and this notes how part of the increase in diagnosis is due to closure of "mental hospitals"
https://www.ncbi.nlm.nih.gov/pmc/articles/PMC3757918/