Quickly: Ostracized for being too smart, or for exercising it in ways that aren't acceptable to those around you? Sometimes it's better to hold one's tongue around the boss and find other ways to get one's ideas out there. But yeah, people can be intimidated by "smart". Isn't it our responsibility, then, to find ways of making that work for us with others, instead of against us, rather than simply saying other people are dumb? Seems like a way to minimize other people's contributions and boost our own from a certain point of view.
Partner selection: Less of a concern? I assume you found someone in college or at work, then, especially since you are in a field often dominated by men. So, you had your pick of the lot essentially? Not everyone gets that opportunity.
First, "risk their ego"? That's a pretty broad assumption that I find a little offensive, even as a man who has a very smart and successful partner. There are so many reasons one could choose a particular partner. Frankly, it's tough to meet people in the first place, people only have so much time in the day and in their lives, so choosing who will be one's partner is harder than simply going to a supermarket to pick one up (maybe not in your case). Some people simply end up with someone who isn't totally optimal; Love is a powerful thing. Maybe they fell in love and pulled the trigger in the first 30 days. Maybe the guy has a fetish for nice feet or red hair or green eyes or big butts and his sex drive overrides his better judgement. Hell, I have a friend who is not entirely compatible with his wife, but one big reason he loves her is that she allows him to dress like a woman around the house. Incredibly beautiful, smart, successful couple. Would he complain about his wife a little to co-worker? Maybe. Admit his sexual needs to a coworker? No. Or maybe these men's prospects with women didn't seem so great at the time and, hey, any port in a storm.
Second, I find this supposed-scenario (see #3 below) a little denigrating toward these husbands' wives. I'm sure those women bring great things to the table, but the grass is always greener right? I have a smart, well-to-do partner... but no one is perfect and sometimes I do wish for something else. Are these men simply not appreciative of what their wives bring to the table? Are they simply making small talk at work? Maybe they feel your husband needs an ego boost and they're being friendly, or maybe he's a superior and they feel a desire to make him look good at their expense because that's what people in social hierarchies do sometimes. Are they simply human for seeing something from afar (I'm sure your relationship with your partner isn't all peaches and cream all the time) and viewing only the good parts (i.e. these men are only human)?
Third, your gentleman-engineer partner might just be talking down how these men speak, making himself sound wise and smart and awesome (the basics make him sound condescending, but I'm sure reality is more forgiving than that) while other men (potential mates evolution-wise) look less attractive. Bad act by him? Not necessarily. Natural? Totally. You're only getting one point of view, his, and I challenge you to ask each of these men about these interaction with your husband to discover their viewpoint and how they really think about their own relationships.
Fourth... oh so many factors. Did these wives give up careers to care for kids? Were they academically inclined in the first place? I know a lady who is DYNAMITE with people, but couldn't do math to save her life so she does reception and party-organizing, which people adore her for. Saying these women are under-achieving may be part of THE EXACT problem with our society: If you don't work no one values you. I'm sure it's easy to find material about how in many cases work is an easier time than parenting/homemaking.
Maybe these men want to be the breadwinner and sometimes it isn't the fulfillment they were hoping for, so they complain. Maybe when they started working it was possible to raise a family adequately on one income, but the game's changed and they're stuck (and certainly wouldn't admit that in front of a co-worker, I suspect). Hell, maybe they just had a bad day and were bitching about their relationships. People have been known to do that.
There are so many other issues here... how people are brought up, personal qualities, circumstances... it feels like such a gross simplification to write off other people's problems as,"Well you should have made a better choice, buddy" that it's a bit of an affront to the collective intelligence here at Slashdot (such as it is) to make such a basic assertion, especially with you and your partner as engineers.
Since this is SO darn long, just to get this feminism schtick out there: The other handful of long term partners in my past all identified with some sort of "strong woman" ideology. It was very similar to the one men often try to exude, it seems, and it made them look like the men that feminism espouses avoidance of. Some were "achievers", some were not, but all of them had lots of great qualities otherwise. These words "smart" and "successful" seem like a terribly simplified measure of what humanity has to offer.