Interestingly, in that Matthew 24 quote, Jesus never said, "Don't get married!" He simply warned that a time was coming when pregnant women and those with babies would have the most awful time of it. We know, with hindsight, that he was predicting the brutal fall of Jerusalem in A.D. 70, by the Romans.
In 1 Timothy 4, Paul was not saying "It's ok to get married at a time of tribulation." To set those two texts in parallel, as if they were speaking of marrying at a time of tribulation is clearly not the case. If Jesus had been indicating a time when it would be best not to get married, he would have given a clue about the time to stop getting married, say, around 65 A.D. He gave no such hint because he was not trying to stop anyone getting married, at any time.
Paul was speaking of people coming into the church at a future time, who would teach doctrines of demons. They would be liars. They would forbid people to marry; they would forbid people to eat certain foods.
Now we've got rid of those two red-herring texts, here is the answer to the actual question - "Is it good to marry at a time of tribulation?" Quite simply, when a time of tribulation erupts, it's too late to consider not marrying, or not procreating. But - worse - some people trying to control others in the church, by predicting a time of tribulation about to start, leading up to 'the end', can develop a track-record of warning their members not to get married, or, if married, not to have children till the danger is over. Here's one such historical record:
At a 1940 gathering, the group's president declared, “This might be the last assembly before the great tribulation.” He then advised the audience not to marry or have children. A lot of them paid heed, including a young married couple who postponed having children till 1946 (my parents).
In 1941 all the children from five to eighteen years of age were spoken to at another assembly. They were given a free copy of a new book which presented a fictional young couple who were engaged but who had decided to postpone their marriage until the arrival of the New Order which was so near at hand. "When the Theocracy is in full sway it will not be burdensome to have a family" (page 366).
1 November 1938 a magazine article was entitled, "Fill The Earth". It declared that Armageddon was just ahead and the survivors would be privileged to then fulfil the divine mandate to fill the earth. Thus, they should not marry and rear children because of the urgency of the work they had to do. On pages 324 and 324 the article categorically stated:
"It would therefore appear that there is no reasonable or Scriptural
injunction to bring children into the world immediately before
Armageddon, where we now are."
Leaders revived this 'advice' around the 1970s. Once more, they were declaring their expectations for great tribulation to erupt. At an 1987 gathering, a discourse was given entitled "Responsible Childbearing in This Time of the End". It encouraged single persons to stay single and for married couples to remain childless to better serve in the work made necessary because of the nearness of Armageddon.
That November another article called, "Unmarried but Complete for God's Service" said, "But we must develop and control our circumstances so that the ministry is never relegated to a place that is less than central to our life (15 Nov 1987 issue). It commended those of the 1940s era who remained unmarried, free to serve the religious organisation. So, after a gap of about 30 years, it revived previous tactics that had worked so well in preventing marriages and children resulting.
That article and the following one, "Singleness, a Rewarding Way of Life", quoted 1 Timothy 4:3. They later published an article entitled, "Is This The Time to Have Children?" it said about their married couples who were devoted to the work:
"They have chosen to remain childless so that they would be less
encumbered to carry out the instructions of Jesus Christ to preach the
good news of God's kingdom earth wide before the end of this system
comes." 8 November 1974 issue
Even in 1996 pressure continued with an article called "Singleness - A Door to Undistracted Activity" being studied by all members worldwide (5 October 1996 issue.)
That's what's wrong with forbidding marriage or having children at an anticipated time of tribulation. It's a control mechanism to keep members of a religion working undistracted for the interests of the organisation.