My 7 year old was the same way when she was 3. She is my oldest so I don't think it has to do with her being the middle child because it sounds like you do one-on-one with her. I thought my daughter was going to be "the death of me", but I never gave in and stayed consistent. It took 20-30 times for her to learn lessons. I almost gave in several times, but then you have to start all over if you do that.
She would scream for up to an hour. I made her go to her room until she calmed down. I told her she could come out when she was sweet and could talk like a big girl. Then I would be able to talk to her letting her know that behavior isn't acceptable. It wouldn't do any good to talk to her before that because she didn't hear a word I said and it just made me even madder. If I needed to calm down myself, I would lock myself in my room because she wouldn't stay in her room most of the time and if I was too upset I didn't have the patience to keep taking her back. Holding her door shut didn't work either.
She understood when we talked afterwards, BUT it didn't stop her tantrums -- we had to do the whole process everytime. She didn't care about any of her consequences, like taking toys away, etc. So my Mom told me to try the "squirt bottle". I would squirt her when she started a tantrum (just once or twice), and she soon learned to stop very quickly when she saw the squirt bottle. I gave her a warning to stop or I would squirt her. It worked great!!! I even kept a travel size bottle in my purse for when we were out doing errands. That is really what worked for me. That is how they train cats, so it isn't a "mean" thing to do. I also always took a treat box with me into the store to contain her while I did errands.
I learned since then to just stop what I'm doing and hug her, and to give praise where and when it is needed. I stopped letting her upset me, and just looked for better ways to parent. I stopped yelling at her when she was in trouble so that she could learn that you don't have to yell.
I started giving her only 2 choices on things, when I told her NO to something else. (i.e. letting her choose what to wear out of her whole closet was very overwhelming to her, so I hung her clothes up high, and let her choose from 2 outfits that I chose that were appropriate for the activities for the day). I set a routine for her to know what to expect at certain times of the day (night routine - bath, read, prayers, short movie, etc.)
I took sugar away, and gave her healthy snacks. I just didn't buy it so the temptation wasn't there. I do believe diet has a lot to do with it. If I were to do it again, I would keep a diary of when her tantrums started.
Best wishes, D.