Both can be used, but imply different things. A "miscarriage" would apply to a project that failed to reach completion for some reason. A "stillborn" project is one that can metaphorically be said to have "died in the womb" as it neared completion, and looked at afterwards as not useful for its intended purpose.
Both are similar, but "miscarriage" is more of an active term, and is generally used when talking about the results. Perhaps the project it had a team of incompatible people working on it, who fought so much they didn't have time to make meaningful progress before the deadline. Perhaps funding was inadequate to produce the list of required features. Or perhaps management interfered so often by changing requirements that the project never had a chance to get off the ground.
Meanwhile "stillborn" might be used for a project that was flawed from the start and never had a chance to deliver its desired result.
Naturally the metaphor may be distasteful, or at least uncomfortable, without the appropriate tone (and, naturally this is not limited to English, as it would likely be the same in many other languages). To use this it would be best to convey a tone of regret, as with something very important to you that nevertheless failed to properly mature.
The team declared the project "stillborn" after they realized their initial hypotheses were inherently flawed, and decided to work on a different approach.
Although they had been making steady progress, the project suffered a miscarriage in its second year when the lead researcher had to drop out for medical reasons, and eventually the company was forced to cancel their funding.
In terms of your linked question, I agree that "stillborn" works better, as it's an idea that will never quite work. It didn't fail, but rather it had already failed, or was a failure from the start.
Some alternate metaphors:
dead on arrival (D.O.A): The project was declared DOA after their competitor beat them to market with a superior product.
(did not) bear fruit: Although the researchers tried every possible combination they could think of, their efforts did not bear fruit as they were unable to produce a significant result.
(Edit) I should qualify "stillborn" in response to your comment: You can talk about something being "stillborn" after the event. A "stillborn" idea is one that was figuratively born with no chance of being viable. For example, I might (humorously) conceive of an idea of training an army of cybernetic chimpanzees by training them with banana-flavored weaponry, only to be told it's a waste of time -- effectively "stillborn" -- because chimps prefer mangoes to bananas.
Similarly, you would describe a project as "stillborn" from the perspective of when it was "birthed", and assuming it had no chance to succeed because it was flawed from the start.