It is true that the penalty of sin is death and pain, but the scripture does not say that the very person guilty of sin is to endure pain. Rather, the scripture tells us that others, themselves freed from sin, can take the sin of some:
he hath made sin for us (2 Corinthians 5:21)[I] now rejoice in my sufferings for you, and fill up those things that are wanting of the sufferings of Christ, in my flesh, for his body, which is the church (Colossians 1:24)
There is a hypothesis in the Catholic Church, that Mary, because of her birth free from the stain of original sin, could not have suffered the pains of childbirth. However, that is not a doctrinal belief obligatory of the Catholics. If you were of the persuasion that Mary did not suffer from the pains of childbirth, you would probably hold to the belief that Mary suffered in the metaphysical sense, as indicated by Luke 2:35, but not in the physical sense of experiencing pain.
The Catholic reading of the scripture is direct. If a woman described as mother of the Christ is in the scrupture, we don't look to run away from this revealed truth. Likewise, if the scripture reveals to us that man is not saved by faith alone (James 2:24), we do not try to put some Protestant nonsense on sticks to teach the opposite. You want to be free from these convolutions, become Catholic. god bless you for your questions.
That is not the issue. The Rev 12 passage says she cried out from her birth pangs ... that implies she was suffering from the Genesis curse during childbirth. If she was sinless, how could she be cursed with this? ... especially if she was spared physical death (another Genesis curse for sin) by being assumed into heaven.
We are getting way off topic ... but when the majority of the NT teaches "faith alone" ... I have an obligation to believe it. The difference is ... when I look at James 2:24 in light of the rest of the NT, the preponderance of evidence from the rest of Scripture argues against James teaching "faith plus works = salvation." I may have a difficult time explaining the passage ... but the Scripture cannot contradict itself.
Now if you take James to teach "faith plus works" ... you have a much larger task explaining the rest of the NT. I would rather be in my position than yours.