I have two very strong-willed daughters, so I understand where you're coming from. (And I think being strong-willed is a good thing, but it's difficult to manage sometimes in a preschooler!)
What worked for me was to remove the child from my immediate vicinity. In general, I view a time out not as a punishment, but as an opportunity for the child to pull herself together. Children don't WANT to be naughty, but at times they can't help it. At this age, they don't think very far ahead in terms of consequences.
So, when it became clear that the child was on the path to a meltdown, I'd take the child by the hand (or if they went all spaghetti-legs on me, I'd carry/drag them, calmly) and we would go to the child's room. Now, I should say that we had a playroom, so my kids' bedrooms were just for sleeping. Nothing too exciting in there, and a safe place. I'd tell them, "I see you're upset. When you're feeling better, you can come out." And then shut the door. The child was free to scream, cry, gnash her teeth... whatever. Not within my earshot, so I don't care what happens in there. If the child came out of the bedroom before calming down, I'd take her by the hand and lead her back in there, and repeat what I had said.
And then, when she came out, perhaps still sniffling, I'd give her a hug and say, "Feeling better?" and she'd say, "Yep! Let's play Barbies!" and we would move on with our day. Also, when the child did something really good, like cleaning up her toys without being asked, or sharing a favorite toy with her sibling, I'd make a point of saying, "Wow, I love how you cleaned up your toys! Look how nice the playroom looks now!" - so she could feel pride in this small accomplishment, and hopefully want to repeat it again.
My girls are now 8 and 11 and are well-behaved and easy to manage (for me, and for their teachers, babysitters, etc). I think this is because they have learned that when they are feeling cranky, they need to remove themselves from the presence of other people for a while until they're in control of themselves. This is a strategy that will serve them well throughout their lives, I think.
So... that's what worked for me. I just didn't see it as a punishment, but as a chance for the child to regain control of herself.