I don't do it as a deliberate strategy as I am vv aware it doesn't help - but DS1 has ADHD, DS2 is awaiting assessment for ADHD and ASD, and I have a 3yo as well - it's a lot and sometimes it's the only way to be heard over the madness, and/or I just get to my limit and then go over it before I can stop myself.
It's actually really counterproductive with DS2 in particular, because he can get extremely anxious and I am starting to really see how the anxiety is actually the root of all his challenging behaviour. Whereas DS1 had issues with impulse control and needed structure, DS2 has elements of that but also struggles a lot generally just to cope with the world, and then has outbursts as a result of those struggles. So what helps the most with him is actually the very opposite - being calm and predictable and soothing.
I am much better now than I was when DS1 was little (he is 16 now). I seemed to shout at him a lot I didn't really know how else to get him to do stuff with any urgency, other than just getting louder and closer, and it did seem to work even though I found the whole charade stressful and felt guilty about it. At some point he got to an age where I felt that urgency was not really a part of my responsibility any more, and I have never shouted at him since then and probably won't ever again, unless it's some kind of warning of danger.
I tend to manage urgency now by being more proactive rather than trying to do everything at the last moment and wondering why it didn't work. But I also have ADHD, so I think I am quite quick to leap into an emotional response, I have got better at this with more awareness of it, and more organised with helps with being proactive and predictable too.
In general, anger and threats of punishment aren't good strategies, even with NT kids. I know that some people hold onto it as an approach, but it's very old fashioned. I understand that basically, if you make your kids scared of you/your reaction/the punishment you might give, you'll gain a level of compliance which means you can effectively control them when they are small enough, but it's more a smokescreen of control because when they are older they simply learn to hide things effectively, or do it one way in front of you and something totally different when you're not there.
According to what behaviour research tells us now, punishment doesn't actually cause behaviour change - I think this is one of the most surprising things, but also, when you think it through it's logical too - even though plenty of good parents use mild punishment and their kids aren't terrorised, apparently they have now found it's not actually the punishment (or threat of) which is causing the lasting change in behaviour, it's all the good constructive positive stuff you're doing around it, like setting them up to succeed, praising them for doing the right thing, helping them work their way through problems or obstacles, supporting them in building skills, talking about reasons and empathy, making things fun, modelling the behaviour and values you expect etc. Mild punishment can apparently support goals that are being led by these things and might help establish rules/norms more quickly particularly within groups, but it does not cause behaviour change on its own, and it's quite costly in terms of the fact it erodes trust and may build a sense of resentment and opposition. The only thing that it can achieve on its own is compliance, which is temporary.
The opposition thing won't matter for the majority of children if, after the fact, they feel the punishment is fair and you overall have a good relationship. It might still erode trust in that they may avoid telling you things if they think you won't like them doing it. But again this is likely very minor if you have a good, open, communicative relationship in general. It is not the end of the world to use it as a shortcut sometimes. But in general, parenting should be focused on other strategies.