The Sefas Emes zy”a quotes his grandfather, the Chidushei Harim zy”a, as explaining this pasuk by quoting the words of Chazal (Sanhedrin 99A): “In the place where baalei teshuva stand, complete tzadikim cannot stand.” With this in mind, he explains that the men had committed the sin of the eigel hazahav, but they had now repented. The women, on the other hand, had never sinned. This is why the words of the pasuk literally mean that the men were “on the women”, meaning that they were superior to them, because they were baalei teshuva.
He explains why baalei teshuva are superior to complete tzadikim by saying that someone who has committed a sin remembers the great desire he had to do the aveirah and he channels this passion to use it to serve Hashem. Only baalei teshuva have this level of enthusiasm in their avodas Hashem. Tzadikim who have never sinned do not have the same fire because they never felt a fiery passion to sin.