(Don't quote this in reply, it's much too long! I will read replies on the thread anyway.)
I mentioned the big baffling behaviour book so will try to explain using that framework - it's essentially based on the idea that as our arousal level varies throughout the day we'll go in and out of different states of being. The further we go into some kind of protective mode due to perceived threat or underlying stress, the further we get from being able to easily access the front part of the brain (prefrontal cortex) which is where we can do all the complex stuff like communication, empathy, reasoning, patience and so on (and of course, young children are still developing all these things anyway).
When you tried to help him with dinner and he hit out in response, it's likely he was in an elevated state already - I would reckon probably what she calls "back off" (which is level 3 of 4 of the "watchdog" - aggressive/defiant pathway) because while he did physically lash out and hurt you, it sounds like it was more of a reflex or defensive action, rather than one actively calculated and designed to hurt.
Essentially, for whatever reason, whether he didn't understand the risk of the hot food, thought he could handle it and felt it unfair you wouldn't let him, or just wanted control over his own plate, but didn't have the ability in that moment to interrupt you before you approached and explain exactly how he wanted the food (which would be the ideal way to deal with that if you are unable to pour a hot liquid yourself). Bear in mind that you don't end up in level 3 from nowhere, so he was likely already on somewhere around level 2 so he's already one step removed from all the good communication skills, ability to ask nicely or even to be able to have anticipated that you might not let him pour the gravy himself.
Some guesses as to what might have put him into level 2-ish - you mentioned a family member rather than DH, so perhaps people were visiting. Different food to normal (not being able to anticipate things like mum needing to pour the gravy) It's also just dinnertime and he's a toddler - they can get tired and hungry and that depletes their ability to handle anything much at all. There may have been other things happening throughout the day as well. Think of these explosions as being a sort of "buckaroo" moment where each different thing piles up on the donkey's back until it all explodes at once.
Back to the dinner - he is removed from the situation, which of course he won't like - screaming crying etc. Unclear without being there whether he remained in level 3 or escalated to level 4 (level 4 is basically when they are acting like a feral animal as though they are in fear for their life, not all children get all the way there).
Presumably, the relative felt he had calmed a little hence letting him out - but then he is defiant saying "Ha ha I'm out".
Firstly - I totally get why you feel despondent at this and why a PP suggested continuing the time out. Because it feels like children ought to be contrite after being punished, or it feels like all the screaming and crying while in the room was fake if he can switch instantly back into "ha-ha" mode. (It's not).
But this is actually interesting because it is de-escalation. He has gone from physically lashing out to verbally taunting, being silly. This is more a sign of level 2 (Ready for Action). He's not making threats, or being physical (that's level 3 behaviour) - he's just sort of grasping at power and control here, but not in a very serious way. He knows he's not winning and he's not actually trying to - he's just trying to save a bit of face.
You can go the route of doubling down back on the time out etc, or even escalating to a more serious (ie, scary) punishment - though for some children this will just make everything worse because it will escalate them further until you get to a point that you win because they are physically exhausted or you have physically overwhelmed them - this is not great for anyone involved IMO if it is happening regularly. It might be that some children occasionally get into a bit of a power crazed spiral and a once-off, strict put-your-foot-down response sort of snaps them out of it and they don't try it in the future and their behaviour is much more moderated (but I suspect this is not that child!)
You can give up, thinking "Christ what is this child, how can we ever discipline him when he reacts like this at not yet three" and walk on eggshells around him trying not to set him off - not a good solution either.
I think there are face saving ways you can approach it. The book suggests at this point that you would switch from the Level 3 response (essentially do back off/don't escalate, avoid much if any verbal input, keep everyone safe, which might include removing the child to another room) to a Level 2 response which can be more verbal but still needs to be focused on essentially - you're not in trouble, I'm not a threat here, and keeping your own head in a calmer, confident space knowing that you are in control of the situation (which is much much easier when you can see things like the shift from physical > verbal as being a step down - it's hard to explain but it's like solving a puzzle). Essentially reminding yourself that you ARE the adult and he is only three so you don't need to be frightened by his response, even though your own brain/threat detector is telling you his defiance is a threat and you need to squash it immediately.
It could be that the adult doing the time out, assuming this is a sort of lead-him-away-to-cool-off thing recognises ah, OK, we're not back to baseline yet, we're not ready to rejoin the family yet - let's stay here a bit longer and try something different - but some different strategies may work now we're at level 2 - sensory input can be good like hitting a pillow, being wrapped in a blanket, movement/exercise challenges, or look for something red/blue/green can work well in this moment, or a cold drink/fizzy water/something to bite (teether, apple, crunchy food). Or something which encourages big deep breaths, like singing/shouting/blowing bubbles/blowing over a little toy or even breathing exercises you've practised previously (anything new is unlikely to be much use in Level 2+). Or connection like the classic How To Talk validating feelings, or starting to joke around and react to the defiant comments in a playful way e.g. pretending to be a policeman/fierce giant who is shocked and surprised that their prisoner has escaped. You might also be able to do these things without actually removing him again. And not all of them will feel right to you (or work for him) and that's fine. If you've tried them before, bear in mind that almost none of this will be any use at all at level 3. Only once he has de-escalated to level 2.
But the important part is that you need to wait until he has fully de-escalated, not in level 2, back to baseline before you start trying to work out solutions, compromises, reasoning, explanations, apologies, what to do next etc.
It could be that you give a very minor/token consequence, but if you do, it has to be something which is not going to escalate in the moment - so, it has to be predictable and explained in advance. Don't spring on him that because he misbehaved, he has lost something that he was really looking forward to tomorrow, or something like he has to sit and watch everyone eat pudding but he gets none - but for example, if there is some kind of behaviour point system you could say "I'm afraid you have lost your point for this afternoon but we can try again this evening." (And honestly, I don't think I would do this at all with a 2yo - it might be appropriate with an older child, again ONLY within the bounds of a very clear, familiar, explained system.) You could also explain a natural consequence e.g. "Unfortunately your dinner has gone cold now - would you like me to microwave it or would you like some bread and butter instead?" - but I wouldn't go with imposing an extra consequence which is related (e.g. missing pudding). I know this is what everyone says you're meant to do, but for children who get very easily triggered into a threat response, it is confusing and unhelpful. Keep it to a strictly natural consequence (e.g. the thing is actually impossible or has already happened) or a token thing within a system that the child knows and understands is also OK but at 2, I think this is a lot to follow when they're in that emotionally overloaded state, so I'd skip it.
But the majority of the work to change the behaviour doesn't actually happen within these moments. It comes at other moments when you reflect on what patterns you see and what tends to kick off explosive behaviour, and you may realise, OK, it's really important to my child to have control over their food, how can I create a system where I ask him before I do something like pour gravy, but also, he knows he can ask for no gravy/yes gravy/only here please/not touching the food/in a bowl on the side, without panicking and lashing out and hurting someone, when someone else serves him who is not me. So you'd then work on dinner etiquette and how to make polite requests and what to expect in XYZ situation. Because if your DS is like mine, then I wouldn't have to be looming over his (hypothetical) plate with the gravy jug for him to freak out - he would see me from the other side of the room and immediately start demanding to hold it himself. I'd try to explain about it being hot but his concern wasn't about it being hot, it's about <foods touching> so we are totally talking past each other and getting louder and more urgent, me because I'm worried he's going to burn himself or spill the gravy, him because he's worried I'm about to ruin his dinner, even though this does not occur to me because of course I would have asked first. But he does not know that.
It's been helpful in situations like this to be able to work on the social model of what people are actually doing when they e.g. appear with a jug full of gravy, so that he knows that nobody is going to just pour it on his food without asking, we would ask him and also that it is not a good idea for him to grab it because it is heavy and hot. But we have to work on this outside the moment e.g. in role play with toy food, or in conversations or in pictures or taking the real scenario slowly, with lots of verbal prompts and reassurance. Trying to explain it right there in the moment at normal dinner serving speed, with the real jug of gravy doesn't work because he's already escalated into a state of panic about the imagined situation he has dreamed up.
(And yes these are all very common autistic interactions but I can't elaborate on that any further as it's nearly 1am where I am, and I need to go to bed!)