One possible fanfiction could be about Joffrey's brother Tommen growing into a wise and just ruler. He could be shown learning from the mistakes of his older brother. He might start secretly training in combat and political strategy, with the help of some of the more noble characters in the series, like Tyrion perhaps. He could then start to make changes in King's Landing, trying to reverse the chaos that Joffrey had caused.
Well, clearly Joffrey is one of the main characters. His brother, depending on the specific fanfiction, could be any of the other male siblings in the story's universe. It could be a brother who is more kind - hearted and has to deal with Joffrey's difficult personality.
One interesting plot could be about the two brothers having to overcome family rivalries and court politics together. They might start off on bad terms but gradually come to understand and support each other.
The twin brother might befriend Tyrion. In the original story, Tyrion is constantly undermined by Joffrey. But the twin could see Tyrion's intelligence and value. Together, they could form a powerful alliance against Cersei and Joffrey. They could work towards a more just rule in King's Landing, reforming the laws and improving the lives of the common people. This would completely shift the power dynamics within the Lannister family and in King's Landing as a whole.
One possible plot could be that Joffrey's twin brother is the complete opposite in nature. While Joffrey is cruel and tyrannical, his twin is kind - hearted and wise. He could secretly try to undo the damage Joffrey does, like secretly helping the common people that Joffrey oppresses. He might also try to influence his mother, Cersei, to be more merciful, which would create a lot of internal family drama as Cersei is so protective of Joffrey.
Sansa Stark is frequently in these fanfictions. As someone who was a victim of Joffrey's cruelty, if he is in a time loop, Sansa might find herself in a different situation each time. Maybe in one loop Joffrey starts to treat her better, which would completely change her perspective and her own actions within the story. Also, Cersei Lannister could be involved. As Joffrey's mother, she would be very concerned about any changes in her son during the time loop and might try to interfere to keep things as she wants them.
Well, if it's about Myrcella, Joffrey's sister (but still in the family dynamic), she could be kidnapped not for political reasons as in the show but by a group who wants to use her to expose the incestuous nature of the Lannister family. She then has to decide whether to go along with it or try to protect her family's secrets while also trying to survive. This could create a really complex and morally ambiguous situation.
He could marry a foreign princess. This would bring a new dynamic as she might have different cultural values and beliefs, which would create interesting storylines as Jaime adjusts to being with her.
In fanfic, the relationship between Joffrey and Sansa is often a complex and twisted one. Joffrey was cruel in the original story, but in some fanfics, writers might explore a different side of him in relation to Sansa. It could be an exploration of what might have been if Joffrey had not been so evil, perhaps delving into a more romantic or at least a more nuanced connection between them.
In a fanfiction, the lemon could play a magical role. Imagine Joffrey is cursed, and the only way to break the curse is through a lemon - related task. This could lead to a whole new side of Joffrey being explored as he has to rely on something as simple as a lemon to save himself.