I get everyone's sentiment here regarding Ayaka and Masato's punishment, and that there wasn't much comeuppance for them, but I'll say my two cents.
Despite how it was initially and whose POV it was told, this is all about custody of Kokone. Remember that everything that the dad did was for Kokone, her daughter. Yes, you can argue that husband was hurt due to the cheating, gaslighting and mental anguish that wife did, but he set it all aside for his daughter.
Guy could've managed to destroy Masahito and Ayaka's image by going scorched earth, but he didn't because he won't get the custody of his daughter that way. Back in the first chapters, when he was trying to get a lawyer, everyone was eager to represent him but once they learned it was for custody they backed out.
This story wasn't about revenge, it was about the hardships of all the fathers in the world to try get custody of their offspring. Even if the mother was the most horrible neglectful parent in the world, it's pretty easy for them to get custody. Compare that to the father, even if he already showed evidence of how a great and loveable dad he was to his daughter, it's still not enough.
Regarding Ayaka, sure you can say that the author was making excuses for her, but in reality this is a pretty common occurrence. She might've experienced postpartum, and that's why she felt that Kokone was taking MC away from her and found solace in another man. Now, again, this doesn't excuse her, it just gives reason. Reasons don't mean giving excuses. Author needed to show that despite everything that happened, cheating and then the divorce, Kokone still has her mother. Her punishment is that now that she has learned to love her daughter again, she has less time with her.
For Masahito, I can agree that there should've been some more punishment for him, but if we started the story with his perspective we might be a bit more sympathetic towards him. His reason is that he too was a victim, his mistake is that he directed that to the wrong person. He did redeem himself a bit, not fully maybe about 10% only, by helping MC to win the custody with that recording.
TLDR: Story is not about revenge, but a custody battle. Reasons given for Ayaka and Masahito don't redeem them, but only tell their motive.