Can a relationship work with a good synastry and a bad composite?
It's highly dependent on the composite itself and what the aspects are, if any, and how they compare to your own natals. For example, my partner and I have a lovely synastry chart full of trines, conjunctions, good house placements, and all the right stuff; however, our composite has some nasty squares that most astrologers have told me are red flags and would prevent us from committing. But what wasn't observed was my chart and my partners chart are full of squares and we both familiarise and are excited by that dynamic. We've been together for three years and at first there were quite a few bumps in the road within the first year, but since then we've really figured out the challenges. Not a day goes by we don't say we love each other, and never once was commitment to each other even an issue. I will say though, we both have heavy Taurus and Pisces in our natal charts so we stick things out through thick and thin while loving unconditionally.
No composite chart is bad. It's just a matter of the couple and how they relate to the chart itself. A couple could have the best looking composite with trines and conjunctions, but their individual charts are square heavy. They'd most likely find the relationship boring. Vice versa, a person who has a lot of trines and sextiles in their chart would find a square heavy relationship quite unnerving.
Hope this helps a bit.