What seems like a fair compromise is that the baker agrees to sell the cake without the custom phrasing -- as reject content is typically not discriminatory. The customers can get the cake icing done elsewhere, or do it themselves.
But to not even agree to bake them a cake? That's clearly not even close to meeting in the middle.
I think when it comes to customized content -- like writing on a cake, there is far more leeway in rejecting customers, and I do believe there is precedent on this. A baker isn't required to provide content that is obscene, like a penis cake or profane writing.