Hello, my son is like this (nearly 3). The thing is, he can understand a little bit, but isnt experienced enough to think through all the consequences of things he does. He also obviously thinks he is the centre of the universe and why shouldn't everything be organised for his particular pleasure? Do he screams and hits me when things don't go his way. They simply get overwhelmed by the "big" feelings, like disappointment when something goes wrong, or anger when they don't get their way, and cannot cope.
I think you are doing things fine - calmly warn, explain, remove him from the situation.
The only thing I would do is add is a few extras - firstly, give him a countdown to when a change is coming so for example, "you're playing nicely there, that is good. In 5 minutes we are going to stop playing and tidy up, then put our shoes on to go out and see Great gran" Then when he kicks off, acknowledge the problem, "oh dear, I can see you are sad because you want to carry on playing, come and have a quick cuddle and you will feel happy again ". Then say, "oh now we are in a hurry! Quick quick let's tidy up! Shall I help you? Let's race! " I have silly songs for when we tidy up and I make it funny - eg put a toy on my head, in my pocket, upside down on the shelf, or heap them up in a mess and say "all done, tidy!" and wait for my son to disagree, then I dent it and say it's lovely and tidy and that makes him giggle. Making it a giggle helps. Then when everything is tidy, lots of praise for him helping nicely. Then "oh dear we are still in a rush! Quick, run and get shoes on!," And same again make it fun.
If something still goes wrong and he melts down (eg gets stuck putting his coat on and hits me in frustration), Then I warn him, "no hitting, it isnt kind, it hurts mummy" and I move away. Usually he is screaming/crying at this point so I say, "I know you are cross about X, but we need to get moving. Please can you stop crying, because now i feel sad and it's mg turn to cry." So far ALWAYS he has shut up almost instantly to watch me "cry". I have a good old fake wail. If my daughter or husband is around, I tell them each it is their turn and they have a fake cry each too. Then I turn back to my son and say, "right your turn again. Do you want to cry now?" And EVERY SINGLE TIME he has said no, and the tantrum is over.
It is amazing, a trick I got off a shared parenting video from some guy in the US. Do try it, it is unbelievable but it works for us every time!