You are mistaken about autism; my grandson has it. He has no problem with memory at all; in fact one aspect of his autism is difficulty in learning language (he did not start speaking until about 4 1/2); in essence the "natural" part of language development is missing in many autistic children, and they have to learn language as you and I might have to learn a second language in adulthood; but without any tutors and a restricted form of rationality.
As a result, even at 11, my grandson continues to use "scripting" as his primary communications method: He watches children's shows on TV (meant for children half his age), apparently remembers hundreds of hours of it, and when he wants to say something he repeats verbatim and in the same tone and volume what one of the characters has said. This is usually appropriate usage: One example; in a children's show one character accidentally drops something and says, "Oops, that wasn't supposed to happen!". My grandson, trying to pour himself a glass of milk from a full gallon, spills a lot on the counter and floor. He goes to his mother and says "Oops, that wasn't supposed to happen!", which has become his script for most minor accidents. She knows this and asks him, "What wasn't supposed to happen?", and he takes her hand and brings her to the spilt milk. He uses another script, another character on the same show: "We have to clean up this mess!", and his mother says, "Right. I'll get the paper towels." (she does not stay on script, but he talks almost entirely in them). Because he mimics his TV characters, his speech is clear; he doesn't slur or make errors.
Despite this apparent inability to form his own sentences, on paper he understands grammar, and he clearly understands spoken commands. He laughs when appropriate if his mother is playing with him and says something funny. He is sad when scolded or told he cannot do something or go somewhere.
My grandson has an awesome memory for people, places and things. He remembers their names and uses them (as single words). If you ask him what he wants at a restaurant; he will say "taco", "burger", even "enchilada". He just can't seem to string these together into a sentence; I suspect even his scripts are the equivalent, in his mind, are not ten words, but just one very long word: His word for "accident" is "Oops...that..wasn't..supposed..to..happen", longer than "Supercalifragilisticexpialidocious".
My grandson's primary difficulty isn't language; but imagination, and theory of mind. He does not understand motives. He doesn't think of new things. He is stuck on the children's shows because he cannot understand a plot, or that one character knows something and another doesn't. He does not understand implications of some event. He does not understand "money," if you hand him a \$100 bill he will just drop it on the floor. He doesn't get the multi-step process of getting money, holding it, then spending it on something. (His mother has tried: He loves smoothies, she has given him \$10 to give to the clerk at the counter. When she said, "Now you give her the money," he had a \$10 bill in his hand, but dropped it on the floor so he could go through the motions of handing the clerk money.)
Where would a person like this fit in?
Before political correctness (which I endorse, BTW) I suspect all these people were lumped into the "retarded" category. Originally that was not a pejorative at all; it was a medical description meaning delayed development. It became a pejorative because the people thusly labeled are, indeed, not very intelligent by normal standards; they fail to understand things a normal person understands without effort.
Such people, in the past, were relegated to laborer and service jobs that they could memorize. If they were autistic, they may well have had near perfect memories for their tasks and executed them flawlessly.
They could be quite useful on a farm, or as a worker for blacksmith. My grandson can clean his room flawlessly (and put every single building block in exactly the same place every time, and all his picture books in exactly the same order on the shelf).
In a dystopian society with no public care, I suspect that is how they would get by: Working for a living and being housed, fed and cared for by parents, siblings or lacking those, by profiteers exploiting them as "labor for food".
Problems with the plot: Sherlock Holmes deduction relies very heavily on memory, of how things should transpire but did not. A person with memory problems cannot do this! An Autistic person generally has either no theory of mind, or an impaired theory of mind: This means they cannot understand why other people are doing things; they struggle with the idea that others know things they do not, or they know things others do not. The idea of secrets is difficult for them to grasp. This prevents them from having deductive ability about even the most minor of motives or how what they do affects other people. My grandson again: When he is looking through a picture book, he doesn't like noise. So if his mother turns on the TV to watch the news, he will walk to the coffee table, see that his mother has the remote, then walk to the TV and press the mute button and walk away, all without saying a word. He doesn't realize she wants to hear what she is watching, he just solved the problem of the TV mysteriously coming on and making noise he didn't want to hear.
Here is how that transpires: He mutes it. She calls his name, and says, "I'm going to listen to TV." He calmly says, "No." She calmly says, "Yes." He sighs, she un-mutes the TV, and he takes his book to the furthest back room and shuts the door.
My grandson is not the only autistic child I know; because of him I have exposure to about a dozen. Although that is a small sample, I can report that not one of them has "episodic memory" or Sherlockian deductive powers, their inability to emotionally understand other people (or even grasp that other people have intents or desires) prohibits that.
Although your character could be made plausible; Attributing these traits to "autism" will be both implausible and an insult to the autistic community. It is like confusing "tuberculosis" with "lung cancer".
I suggest you attribute your character's traits to something simple, like brain damage due to a physical accident, brain surgery to remove a tumor, or brain damage suffered due to an inadvertent or accidental medicinal overdose as an infant; perhaps in response to a seizure event.