" It is true that commentators generally understand the whole passage as applying literally to the Church, and that part of the verses is better suited to the Church than to Mary. "
You see, they admit it right there. The rest of the commentary has no Biblical support (that's why they offer no references).
But it isn't the "Church" as in the RCC. It's the "Church" like the Remnant, the Messianic community stretching back into the OT.
It's the true Israel.
Claiming that a passage in the Bible about a woman who gives birth to the Christ is about Mary does not require very much Biblical support. It is pre-eminently self-evident. Extending the mystical definition of Mary to the Church, or beyond to Heavenly Jerusalem, requires theology, personal revelation and extrapolation, none of which are available to non-Catholics. But it is those who wish to claim that Mary is in no way the object of Rev. 12 who need to provide Biblical proof. Simply saying so doesn't quite cut it.
Eve says no, and her kind are set against the serpent. Mary says yes, and her son is set against the serpent. Jesus bequeaths his own mother as the mother of his beloved disciple. The offerings of Jesus to the apostles are universaly held to apply to all believers. A woman whose kind are beset by the serpent are identified as disciples of the Christ.
There is no math to do here.
Heavenly Jerusalem cannot be the "mother" of Jesus, for it is Jesus whose redemptive sacrifice enabled it to come into being. He proceeds it. Earthly Israel cannot be the great wonder in Heaven, it is the faithlessness of Israel that necessitated the New Covenant in the first place. The Queen of Heaven is Mary, from the first. Her being extends outwards to encompass the Church and then the New Jerusalem itself, ultimately becoming what she was from the first: the Bride.