*The answer to this is blindingly obvious. Like any repeated behaviour, she does it because experience has shown her it works. To use your own words one of you ‘eventually capitulates’. She’s not stupid, she knows what she wants and she knows how to get it - why on earth would she change her behaviour?
She is three. She is old enough to talk to. In a calm moment sit her down and tell her you and Daddy have decided that you don’t want any shouting in the house. It’s rude and disturbs other people. From now on she will never get anything she shouts for. But if she asks nicely in a polite voice you will think about what she is asking for.
And then stick to it. Always. Every time she shouts tell her quietly ‘oh what a shame, you shouted so you can’t have it’. And always make a big fuss of her when she asks quietly, say ‘Oh that was great, you asked so politely, you can certainly have X’. If it’s not a great time say ‘That was so great, you asked so politely, you can certainly have X once teeth are brushed/after lunch/whatever’.
Consistency is everything . Say what you mean and stick to it. Children need rules and boundaries to help them manage their expectations. Inconsistency is unfair and unkind to them as well as making a rod for your own back.*
This ^
Also small children need to be tought to have empathy for others, when calm she needs to have it drummed into her, that Mummy and Daddy get tired too and need their rest, it is selfish to wake them up.
That yelling upsets the household and she must not do it.
My DS always woke at 5am, by the time he was 3 l had enough of getting up at 5 daily, so told him he was alowed to go and sit on the sofa and turn on Cbeebies ...should he do anything else or turn the TV over he would have to stay in his room until l got up at 6am.
He was so delighted he did this without fail until he started school at 5.
The key is NEVER give in, make house rules clear, make consequences clear, and never break them.
Also l had no tolerance for rude children including my own, and had no compunction about telling them sharply to behave.
The trouble is you have a long haul back op as your DD is so used to getting her own way, you will need to be braced for a loud battle to get this back, l agree it is better now at 3 than later.
Parenting is hard but you can do this.