4 is a tricky age
It's tough trying to be firm but loving. To have clear boundaries without being authoritarian.
Every child and parent are different, and have to find their own way.
One thing that really helped me, at ALL ages, even teens, is to always acknowledge their feelings, without necessarily giving in totheir demands or losing myself in lengthy explanations.
For example:
" you are really upset that I want us to go home now, because you are having so much fun. I can understand that you feel cross. But we really have to go now."
Also, I never tell them off for feeling angry or upset, only for slamming doors/acting out
I dunno, not an expert, but that has really helped me.
Try it. Say " You are really angry! I can see that you think that is so unfair!" Etc.
Sometimes even use this technique on adults 