I think the milking machine has no role in that if I remember correctly. Looked up the walkthrough, no Milking Machine:
Gwynn Demonologist Path (Ending Two) • Once Irith is cured, go to the Institute again • This time, you will observe two girls appearing and entering the Institute • Approach the pedestal and place the spider in there • Regarding the riddle, count the spiders and add seven, but eliminate the first digit (1->8, 9- >(1)6 etc…) • Ask for Gwynn to be enrolled • Ask Gwynn, she refuses • Hide the spider in her bedroom and wait for three nights • Talk to Gwynn again, and she agrees to her demonology training if you bring her a trainee collar • Go to the Institute, ask the Guardian to enter the dungeon and get the training collar • Send Gwynn three times to the Institute for lessons • When she returns from the third time, a cutscene with Nyx will play and the game will move to ending two NOTE: You can follow the ending two path until the second Institute lesson and still achieve the Goblin king ending Congratulations, you have achieved Ending Two