It's not as simple as portraying them as stupid. It's portraying these men as victims of the patriarchy. Often times they are overconfident to their own detriment due to the circumstances they grew up in. It's not about how 'men are stupid', it's about how men in power were conditioned to dismiss women at their own expense. The movie shows how by taking a moment to learn and empathize with women's struggles, they come to learn that healthy masculinity isn't defined by how they are views by women's it's by how they view themselves. This is what Ken does at the end. He escapes the kencel pit and learns to value himself for who he is and his own interest instead of relying on female attention to define his worth.
None of this is something that the men did because they are 'stupid'. It's because of patriarchal conditioning, something that all of us are subjected to in this day and age.