Perhaps in this fanfiction, it's part of a bet or a challenge. Harry loses a bet to Hermione and has to be her slave for a certain period. This could lead to various comical situations as Harry tries to fulfill Hermione's often demanding tasks.
One possible plot could be that they disappear to a parallel magical dimension. In this dimension, they have to learn new forms of magic to survive and find their way back home. Maybe they encounter strange magical creatures that are unknown in their own world.
Well, it's a rather dark concept. One possible plot could be that in a dark, alternate universe, Harry is under some sort of dark magic influence which makes him act against Hermione's will. But this is very much against the essence of their characters in the original series.
In some fanfictions, it could be a misunderstanding that spirals out of control. Hermione and Ron misinterpret one of Harry's actions. For instance, Harry might be trying to protect them in a secret way, but it looks like he's up to something bad. Their lack of trust then grows, and they end up betraying Harry, perhaps by not coming to his aid when he really needs them, which could have serious consequences for Harry.
One possible plot could be that Ron and Hermione suspect Harry is involved in some dangerous secret magic that could put him in harm's way. So they spy on him to find out more and end up discovering it's all a big misunderstanding. Maybe Harry was just trying to surprise them with a new spell he learned.
One possible plot could be the secrecy and the struggle to keep it hidden from their friends. Another might be the way they deal with the reactions of Ron and other close friends. It could also involve how they plan for the future with a baby on the way in a world full of magic and danger.
One possible plot could be that Hermione accidentally casts a spell on Harry during one of their Hogwarts adventures, turning him into a pet. She then has to take care of him while trying to find a way to reverse the spell. Along the way, they encounter various challenges and have to rely on their friendship to get through.
This concept is completely wrong and unethical. Hermione and Harry are friends in the original 'Harry Potter' series. They are equals, supporting and fighting side by side. Fanfiction with such a degrading concept distorts the original relationship and values of the story.
In some versions of this fanfiction, Harry might be a slave as a result of a dark magic spell gone wrong. As he is Draco's slave, Harry could be forced to participate in dangerous tasks for Draco's family, like retrieving a hidden artifact. This would create a lot of tension and conflict in the story.
One possible theme could be power struggle. Even in this unequal setup, Hermione might resist Pansy's control, showing her unwavering spirit. Another theme could be redemption. Pansy might realize the wrongness of her actions and try to make amends. However, this is all speculation as this is a rather unorthodox and potentially uncomfortable concept for a fanfiction.
One possible plotline could be that Hermione is magically bound to serve Slytherin students in tasks related to academic competition. For example, she might be forced to help them with difficult potions or spells in a way that gives them an unfair advantage over other houses. Another could be that she is made to act as a spy within Gryffindor for the Slytherin house, leading to all kinds of internal conflicts and moral dilemmas for her.