OP, you really should know better once you’re in your 30s.
If a married man comes to you wanting your time and energy because he’s so unhappy at home and his wife is “miserable”, you say “go home and spend the time that you’re trying to spend with me, working on your relationship and trying to make your wife happy.”
How did you think that being his shoulder to cry on for months and using time and energy that he could have been putting into his family would help?
You didn’t.
You thought it would serve you. You felt good being this man’s confidant and feeling like you were helping, when actually you were deepening the divide between him and his wife, and him and his kids; surely you can see that?
If a married man approaches you for emotional support and to bitch about his wife, you should suggest counselling, either marriage counselling or individual. You shouldn’t use up hours of his free time which could be spent with his family and then fuck him. 🙄
You must have known that you weren’t actually going to help their marriage, ergo you knew you were actually damaging it.
So, in answer to your original question, no you weren’t a fool, you were incredibly and deliberately hurtful to his wife and his children. You were conscious that the time he spent talking to and messaging you could have been spent playing with his kids or repairing his relationship with his wife and yet you carried on driving a wedge between them. You were really quite cruel.
If you hadn’t known about his wife and kids you could be considered a fool, but you did and you chose to court him anyway; that’s on you.