I would agree with @carrotcakebae that the first thing to do is try to understand what's driving the behaviour – there can be a whole spectrum of reasons, and you won't always get it right, but with a bit of practice, you will a lot of the time. Your daughter is also old enough that you can ask her about what she was feeling/thinking (potentially afterwards; she may not be able to explain when she's in the thick of it).
For something like being afraid of the dark, then I'd go entirely with support – try her with a nightlight (a small string of fairy lights works, if you happen to have one) and see if that helps. My four year old also needs the door partly open to start with so some light from the hall comes in as her eyes adjust. Once they have, the nightlight is fine and we can turn off the hall light/shut the her door. Same with other fears, worries, and the like: support, problem solving, depending on what it is, maybe gentle encouragement to try things anyway.
In the middle, there's times when they have their feelings about something – perhaps completely understandable, perhaps not – but they need to show them appropriately and they may well still need to do/not do whatever it is. All feelings are valid, but not all ways of showing them are. For example, I would understand that my four year old doesn't want to stop playing and go have breakfast, get dressed, etc., and she's angry and frustrated that I'm insisting. She's entitled to those feelings. She can tell me about them (possibly loudly), she can stomp to kitchen, she can cry. At four, those are all acceptable ways of showing anger and frustration. Hitting, kicking, throwing things are not acceptable. For her, I wouldn't tolerate out and out screaming either, because I know she can control that. (There's an element of judgement here; if she's really distressed, I'll ignore things that I might pull her up on if she's merely having a strop, but clearly still largely in control.) A different four year old might still need screaming as an option, or something safe and permitted to hit/kick/throw.
I see my job for this sort of thing as a combination – I need to guide her towards acceptable ways of managing her emotions, perhaps naming them for her, perhaps suggesting something she can do then and there, perhaps talking about options at a calm time. I also need to hold the boundary on what isn't acceptable – and get her fed and dressed. I do still make heavy use of 'let's make it fun' for these sticking points, racing the timer to get dressed, letting her go up the stairs as a cat/rabbit/rocket/whatever. We try to use natural consequences as much as possible, but sometimes you have to engineer the situation a bit. For example, if we get dressed/use the toilet/clean teeth/etc. quickly, there's time for ten minutes of television on a nursery morning. I'll warn her that she's losing her TV time, but if she messes about too much, protests, etc., there isn't time, and that's that. Tomorrow we can try again (but I try to keep it achievable, so that usually she manages it).
Then there's boundary testing. Children do it, it's natural, it's even healthy. I hold the boundaries in pretty much the same way as above, although if it's a question of safety, there's no warnings or games. You don't listen walking down the pavement, you're holding my hand. Show me you can do that nicely, and then we can try more independence again. But again, it's a natural consequence – I've not taken a toy off her, I've said that if you can't listen, to keep you safe, you need to hold my hand.
For things like the night nappy and the supermarket tantrum, they probably need a bit of unpicking. The night nappy might just be spill over emotions from the fear of the dark (if so, easily solved!). Or maybe they're uncomfortable. Or maybe she feels they are 'for babies'. The supermarket – was she tired or hungry? Does she find busy spaces challenging? Or maybe she simply wanted a toy or some sweets and couldn't manage her emotions appropriately (or, alternatively, knows tantrumming sometimes works).
Sorry, that's an essay! Hopefully at least some of it is useful!