> any time he senses a hint that he isn't perfect he shuts down, eventually with a meltdown if pressed

This is almost certainly not what is going on inside his head. I can't tell, from your description, what is happening – if you're not being deliberately vague, that suggests that if nothing changes with your schema, you're probably not going to learn what's going on until he figures it out himself, and then figures out how to tell you in terms you'll understand. That might take years.

I doubt it has very much to do with what you see as "him being perfect": that might be the way you conceptualise the pattern, but (except to the extent he's learned this concept from you) I doubt he's thinking anything remotely similar. It is more likely to be https://www.autism.org.uk/advice-and-guidance/topics/behavio... – but however good this description may be, this is not how it feels from the inside, aged 5. Likely any labels or schema you attempt to apply to this from the outside will be intensely distressing, and the perception (e.g. from your body language, or even just a routine expectation) that you're exhibiting judgement might be enough to tip a shutdown over into a meltdown. So… don't do that. (If this is a factor, what "don't do that" entails is beyond me, and probably beyond your son. It's perhaps not beyond you-plus-trial-and-error, and it's perhaps not beyond a child psychologist.)

If this is what's going on (and remember, this is just a guess), then… basically, you haven't a snowball's chance in hell of manipulating him out of it. You're going to have to be understanding, and you're going to have to be honest. Example: if he were refusing to eat / reluctant to eat / shut down over the prospect of eating, you would have to say something like "I don't want you to starve, but you don't have to eat this right now.", or "You can eat something else, if you make sure you're eating lots of different things, and make sure this food isn't wasted.", or whatever your actual requirements are, put in terms he can understand, with options available but not constraining. (If you couldn't do this honestly, you'd have to find some other approach. I cannot stress how important the honesty is: play-acted, exaggerated emotional responses are fine, so long as they're real. Five years old is old enough to see through it.) The details obviously depend, so I don't know how helpful this is.

You're using the usual words, so I expect you're already aware; but, in case you're not, consider the advice in https://www.autism.org.uk/advice-and-guidance/topics/behavio..., especially “identifying the causes” and “sensory considerations”. Be aware that social considerations might be significant (see above… I wrote this all out of order).

I suggest you seek professional help from a child psychologist, specialising in autism. The job of a child psychologist is to figure out what's going on with your child, and explain it: their job's to be a best-effort interpreter so you don't have to wait a decade until your son can invent a complete theory of psychology with which to explain things to you himself.

(Do not go to anyone who promises, or suggests, behavioural modification – especially not if they mention ABA. This will not help your son. (If they're framing some non-coercive play-like activity as giving him tools, teaching him to recognise his feelings, or something like that, it's probably fine – not at all what I'm suggesting in the previous paragraph, but if you've found someone safe, he might find that useful for other reasons. See https://www.autism.org.uk/advice-and-guidance/topics/positiv... for more information. (Stay away from Autism Speaks: they have a lot of webpages about this, but to a first approximation, they're a hate group.)))

> He calms himself by going into a dark space and sucking on a comforter.

Yeah, that points to sensory processing issues, but it sounds like he's already pretty good at self-regulating. That's something to work from. You'll know better than I, but you might be able to involve him in the process of working out what his needs are. If you do, that means you mustn't talk over his head about it. (So: don't listen to what he says, think of an idea, then immediately turn and tell somebody else about it. Not saying you have to involve him in everything, or that everything that happens should be something he understands, but make an actual effort and an obvious one.)

Involving him is probably just making sure he knows there's a puzzle, and he's best at finding the clues, and he can tell you the clues (or his guesses) whenever he wants to: I don't know whether interrogation would yield any results.