While bouncing lewd ideas around in my head, I accidentally came up with a non-lewd idea.
Take a modern-day western European-esque setting with a hidden magical society, ala FSN or Harry Potter. Put in magical families that are essentially large quasi-aristocratic extended families/clans, with a core of a few dozen magical users and a few hundred non-magic users that form almost an entire village unto itself.
In that context, what I came up with a Count of Monte Cristo-esque revenge idea of a benevolent nobleman who gets betrayed and executed, only through either deliberate magical back-up plans or contrived deus ex machina (preferably the former), gets reborn as the daughter of one of his loyal servant couples, and grows up as a maid in the household of those who betrayed him. Then the story would be her uncovering all the dirt of those who betrayed her, getting them all arrested and executed in a single night-long purge, and taking over her household again.
In this setting, body possession/rebirth is something that simply doesn't happen, so the traitors cannot possibly have any clue the former head of house they offed is right under their noses as this shy, demure, meek servant girl who supposedly can't use magic. Loose lips, lots of drink, and so on, and they'll mention bits and pieces that she'll use to unravel the conspiracy and figure out who all is guilty and innocent.
There wouldn't be any real gender dysphoria, because she's very revenge-focused. But still lots of fish-out-of-water moments, because what would be the point of having him reborn as a girl and not as a guy (well, that, and I guess the powers that be that betrayed him would like maid eyecandy instead of ho-hum butler guy).
Her purge would basically be poisoning as many as she can all at once, then knifeplay to assassinate several more, then using the magic she supposedly doesn't have to take the last few out all by surprise. I also have it in my head she would perform this purge night in her mid-teens. All the years prior to that are investigating and unrooting the deepest depths of the conspiracy to make sure she doesn't miss
anyone, actually setting it up so she can kill every conspirator in a single night, and physically improving her physique and magic in secret because she knows how to min-max from the beginning this time
(the lewd ideas I was bouncing around in my head were bodyswapping ideas, which somehow led to this. As for the lewd part...after she takes over the clan again, she fully takes responsibility for killing off so many of their magic users and promises to replenish their numbers through the efforts of her own loins

Magic users in this setting would typically live 2-3 centuries, and she would live much longer than that thanks to her min-maxing, so lots of years of fertility!)
After the purge is over, she takes over her clan again under hew new legal identity. It would basically be an open secret in magic society that she's the reborn form of the former lord, but it's very much a freak accident/one-time thing, so it's not like other people can just go and get themselves a new body too. Whenever the ruling council of her family's remaining mages pisses her off, or people from other families, she makes a point of showing up in a maid outfit again.
I don't have the motive entirely fleshed out in my head for her being overthrown, but likely a combination of the top few wanting power and rare items the head was able to accumulate, and the dregs coming along for the material wealth. Maybe a little bit of him trying to push some family reforms through, too. He'd probably have been born late 1800s, so he would still be relatively conservative. 16 years later, being fully a child of the 21st century, she would be pushing some really radical reforms through then. Something like:
"I'm going to push these reforms through. If you have any objections, I'm actually, honestly open to fair and reasonable criticism. If you're just being whiny and want to try and overthrow me, well, look at what happened to the last group that did that."
I do have it in my head if she did her purge before finishing high school, she'd at least finish high school as a 'relatively normal' teenage girl while running the house on nights and weekends.