I can certainly relate to this, and so can so many parents of three-year-olds. The first thing to take into account is that your daughter has a very different way of thinking than we adults do. Three-year-olds do not have the same capacity for remembering what just happened (such as what she chose), or predicting what will happen in the future (choosing one thing means she can not have the other). Even a perfectly consistent parent will surprise a three-year-old, because little children do not have the sophistication to predict what adults will do or feel. She is sincere when she passionately desires the object she can't have. We all do this. Social science researchers have found that people value things they might lose more than things they might gain, so whatever she can not have becomes the most desirable. Finally, three-year-olds do not really apply 'cause and effect' to their daily lives very well, and are much worse at making any sort of rational choice when they are emotional.
I do not discount your theory that it is a power struggle, because it certainly is one. You may want to read my Medhelp article about power struggles. That said, your daughter is not deliberately trying to make your life miserable. She has very little understanding of what the outcomes of her actions and at her age she is not able to consciously decide to manipulate others (though I know it looks like she is doing things deliberately). She is basically a little teapot of passions that gets overheated very easily. That is both the blessing and the curse of little ones this age.
So in terms of what to do to decrease this unwanted behavior, you want to teach her a new set of behaviors through positive means. The very first thing I recommend is that you and your husband stop spanking her. The research on spanking shows that it is not an effective form of discipline, as you have observed for yourself, and it generally makes the situation worse (you can check out my Medhelp article on spanking for more information).
I recommend you begin your new plan by first trying to avoid the trouble situation whenever possible. Try giving her a 'forced choice' only ("You may have grapes or apples, you choose", or just present only one option ("Here are your grapes, honey). If you let her choose, which is a good thing for her to learn to do, give her until the count of 5 to choose. Count out loud, ask her to choose, then give her what she has chosen. This is something you should practice with her several times a day. Have her practice making choices, and then reward her with a hug or sticker for making the choice. Let her pretend to be the mommy and help you make choices. Model the behavior you want to see.
For real choices, she may continue to become despite doing well during practice sessions. If she is upset after choosing, try being empathetic. I know it sounds strange, but try putting an arm around her and saying something like "You feel sad because you don't have the grapes." If you label her feeling for her instead of arguing with her about what she chose, she will probably calm down without a tantrum. You do not have to give her the other thing, just label the feeling. For example, "You were disappointed to have the strawberry ice cream" or "You miss having the purple nightgown." You might even let her know something like "Sometimes choosing can be tough."
If after all that, she is tantruming for more than a few minutes, then she is fussing about more than just lost grapes or whatever she did not choose. You know this because she does not do it at school, so there is something happening in the relationship that is overwhelming her. She is probably becoming very anxious about feeling out of control, your anger, and impending punishment. Ignoring tantrums sometimes works, but for many children ignoring a tantrum means that they rage out of control until they exhaust themselves. Most three-year-olds need help to settle down out of a tantrum. That does not mean you will give in to her demands. It means that you will help her calm down and teach her how to do so. Take her to a quiet place, hold her or sit beside her, give her a soft stuffed toy, and soothingly encourage her to take deep breaths.
If she is repeating that she wants something over and over again, make sure not to give in to her demand. Repeated whining is reinforced by your attention. If she does not see much of you, she may be desperate for every little bit of your attention she can squeeze out of you. Even your angry attention can keep this behavior going. So the next time she is nagging, let her know that you understand she is upset, but that the whining is making you a very grumpy mommy. Tell her that you will be grumpy if she keeps whining, and present other options to her, such as "I expect you to speak in your big girl voice" or "Go look at books in your room until you can talk about something else." Get yourself away from her so you do not have to listen to it. Tell her you will be happy to enjoy her company when she can talk about something else.
If you find that you want help, I recommend you ask your pediatrician for a referral to a child psychologist. The psychologist can help you get this under control faster than you are likely to on your own because he can be objective. If seeing a psychologist is not feasible, then here are some books that will help: How to Talk So Kids will Listen and Listen so Kids will Talk by Adele Faber and Elaine Mazlish, and The Kazdin Method for Parenting the Defiant Child by Alan Kazdin. Both are short, easy to read, and to the point.
Disclaimer: This post is written for informational purposes only. It is never meant to replace face to face psychological or medical care. This post is not intended to create a patient-clinician relationship, nor to give or rule-out a diagnosis.