In fact, everything is very simple here.
The plot of the game is one and, for example, divided between the NTR branch and the Pure Love branch. At key moments before sex scenes or moments that could lead to sex scenes. For example, MC doesn't help Rin deal with the bandits, which leads to an NTR scene with the bandits, or MC helps Rin, which leads to a scene with MC.
If the developer writes the plot himself, then after the end of the NTR story, he shouldn't have any problems writing a reverse story of Pure Love branch!