How about. Just as suggestions, it may not work specifically for him.
Have a clock that shoes when its time for his medication. Somewhere visible, so that he knows when it's coming up to medication time and can mentally prepare. Or if it's like a bed time medication. Have a set bedtime routine, that includes medication with say a biscuit and a glass of milk. Set routine, expected.
Have a set homework time that allows decompression time, you need to recover before you can do homework. It might work better to have an hour timed, or if it's like xbox war games where you have to finish what you started have, say, 4 matches, then homework. Then another 4 matches.
Shouting "No" is really absolutely pointless. Especially if he's melting down. The noise alone will just make it worse. Can you create a safe space where he can melt down. Have him help you plan what needs to be in it and help him and you think about his triggers and what helps him.
Top and bottom is, you don't spring stuff on autistic people. You don't expect them to stop what they're doing, or change their plans. Someone earlier mentioned they started just showing their kid their present and where it was, fucking genius. The stress surprises cause is just pointless.
Identify his triggers, ask "I can see you're feeling overwhelmed what could I do to make this easier for you? Well before he's melting down though. You need to see the storm miles before it comes. You don't board your house up during a hurricane. And you certainly don't throw shit at the hurricane.