The Cambridge Commentary on the Bible says
Matthew 1:25
knew her not till] This expression cannot be considered as in any way decisive of the question, whether the Virgin Mary had or had not children besides our blessed Lord.
her firstborn son] The oldest MSS. omit the word “first-born:” translate “a son.”
The commentary is Anglican. It isn't a Catholic work.
One Catholic commentator says
St. Jerome assures us, that St. Joseph always preserved his virginal chastity. It is "of faith" that nothing contrary thereto ever took place with his chaste spouse, the blessed Virgin Mary. St. Joseph was given her by heaven to be the protector of her chastity, to secure her from calumnies in the birth of the Son of God, to assist her in her flight into Egypt, &c. &c. We cannot sufficiently admire the modest reserve of both parties. Mary does not venture to explain to her troubled husband the mystery of her pregnancy; and Joseph is afraid of mentioning his uneasiness and doubts, for fear of troubling her delicate mind and wounding her exquisite feelings. So great modesty, reserve and silence, are sure to be approved by heaven; and God sends an angel to Joseph in his sleep, to dissipate his doubts, and to expound to him the mystery of the incarnation.
The passage doesn't say what you contend. It does not say that Joseph ever consummated the marriage with Mary. You're mistakenly treating the word "til" as if he means "then after he had relations with Mary" but that is not what saint Matthew wrote.