Sounds like a hellish situation OP, but sadly, one of your (and your wife's) own creation.
Not a parent yet, I'm probably not a great source of advice - but seeing how friends deal with situations like yours, it is all about common sense, planning, and no deviation - she's a child, and should not have the mindset you have outlined in post #1.
First and foremost - both parents must be signing from the same hymn sheet, if you are weak, your daughter will (and sounds like she is) use that against you. You both need to have a serious chat, and agree how you are to deal with her unruly ways. Moreso, as your work clearly means that your wife is going to be the main driving force of change.
Off the back of this, you should introduce punishment for not doing what she is told, and especially answering back - take away all access to electronic devices, and stop the TV from being able to access Youtube. Being in the modern world, you have a great rewards system you can implement - not the sticky starts on a chart from the 80s - you can rewards her with internet access! Draw up a chore list, get her doing housework, helping out around the house, keeping her room clean, doing homework etc - when she does these things, rewards her. When she doesn't, then punish her.
One would hope that a ~9 year old doesn't have a smartphone, but I know some parents do dish these things out to their kids - so again, you have something that can be used to reward or punish her. If you've not given her a phone, then you can structure something so that she can keep to 'being good' until the day she gets a phone - maybe keep a diary or something, outlining her behavior; with a view of her getting a phone when she is 12/13.
As for the whole answering back - I would say that she clearly has no respect for you, as she knows you are weak. Regardless of how funny/valid her argument may be, your job is to hide that fact, put on a poker face, and still get her to do what you tell her to. I appreciate you don't want her to have a harsh rule-filled upbringing you had, but the alternative, is her to end up a disrespectful, egotistical and needy adult - much like some of the 'influencers' who are online these days!
If you are truly worried about locking her into stringent rules - you can still give her choices, but have those within your own rules. Let's say she asks for a cat, you don't want the cat in her bedroom, so she answers back and argues - you give her the choice; either she has a cat that does not go in her room/upstairs, or no cat. Same goes for tech - she either uses it at the times you say, or she doesn't get to use it at all.
As I say though - I have no experience whatsoever in these matters, but I do pay attention to how people deal with their kids these days, as I am hoping to start a family soon - so will have a read of the posts after the OP.
Best of luck though!