(NOTE: I don't intend to be crass; my terminology hereunder is in the interest of clarity -- and not to offend anyone, specially T/S. )
AYKA, yeah you're right: Men are not dogs, so don't put a leash on a man.
BUT, hahahahahahaha: Men are like dogs, they fck around.
IMO, a man will fck around. At least once. And that's it, it's effing done and disposed with --- just to scratch an itch.
BUT not every man will have an affair.... As in, to define: A repeat/extended sexual relationship with just 1 person. It starts as an eff to scratch the itch...that develops into a comfy relationship to pander to the itch & ego. and then!, generally -- hahaha -- develops the delusion/illusion "This is true love". Lolz
An extramarital fck does not automatically create a kab1tch. See, a number of factors must simultaneously happen & favor the transformation of a fck into an affair (as far as I know, which surely is insufficient):
The man must have an itch that needs repeat scratching by someone not his wife;
The scratcher (for reasons only she knows for sure) is willing to scratch repeatedly;
A Deal is mutually agreed upon;
The dog, susko! este Man! pala (sorry for the lapse!) -- must find The Time to accommodate the regularized extramarital scratching; and
The philanderer must become good at Lying to his wife, family and the segment of the General Public that will disapprove of the Scratching Deal.
Of course, of course, of course -- there will always be exceptions to my "IMO" theory (after all, what do I know about men & their itches & hmmm, dogs & their itch... Hehe). There are men for sure who are satisfied scratching just at home (Kasi sobra na scratching nila before marrying, or talagang madamot/cobarde kya does not share/spread his love around).
AYKA, yes -- pray and keep your man God-centered so he has a better chance of resisting having someone other than you scratch his itch.
Just wait for your life to play-out. No need to worry until the day to worry arrives.
But, do not also deny the possibility crap can happen.
So, listen to your friend -- not only because a good friend listens & proffers sympathy (talking to you may be her way of unburdening so she can move past this betrayal) ...
BUT You will listen to LEARN valuable insights as to what may have lead to the betrayal....
& more important -- LEARN how she handled the betrayal. What is she doing to get her and her hubby past this dark phase in their marriage?
So, put aside your Fear & Irritation, and remember:
Smart people learn from their mistakes, but
Smarter people learn from others' mistakes.

PERO ka grrrrr really if she expresses her grief by forecasting rains in your life.
Tell her clearly: I know his betrayal hurt you.
I know you don't deserve such (say it! Kahit na you think she deserves coz kahit na deserving sya puede naman pinag usapan nila quesa he went effing around).
BUT I know you will not wish such heartbreak on other people, like me -- your friend. So, let us just pray for each other that this horrible thing does not come into our lives... That it does not happen to you AGAIN. (You said she's smart, ewan ko pag hindi pa nya na getz after that)