I can see why someone would be hesitant to speak to a child and say "excuse me" even though they would say the same thing to an adult.
The difference is that an adult of normal intelligence would not be standing and obviously blocking a doorway and staring at you while you were waiting to pass. The child was doing so and that tells me that either the child was not old enough to comprehend that they were in the way, or they had not been taught that they were in the way. Either way, that problem is caused by the parent's lack of attention. The parent is responsible for blocking the doorway because the parent isn't teaching their child to be courteous and move.
That means that the task of telling the kid to be courteous and move is now falling to a stranger.
Now that I have children, I know better how to speak to them. But before I had kids, I didn't know how to interact with a child that I was not in charge of. How much explaining, yelling, pleading, smiling, cajoling or whatever tactic would it take to move a small child away? I didn't know. I didn't know how to guess a kid's age or ability to understand. And I'd really want to just tell the parent "Hey, slacker parent! Be more aware of your kid, because he's acting like a roadblock."
Now that I have children, I've learned that most attentive, thoughtful parents wouldn't have allowed that to happen for long and would have done their best to move the kid out of the way. My experiences now have taught me that the type of parent who allows their kid to be a roadblock, or to kick the back of your seat in the airplane, etc is not a thoughtful parent. Now, I look at the parent once. If they don't do anything, I do tend to say to the child what I would say to my own if they were doing something like that. I would say "excuse me. I need to pass. You need to move out of the way please."
But I didn't have any of those skills before I had kids. I naively assumed that even the most inattentive and special snowflake of parents would try to teach their kids to do the right thing and that I wouldn't have to take matters into my own hands and do their teaching for them.