I haven't found that this situation comes up that often on R&F, though it does happen sometimes. Just bad luck. Short of fighting Gilgamesh, not much you can do. I am curious about why you cite your recent war with Egypt as a reason for not wanting another war with Gilgamesh. I would think that if you have experienced military units, you should give them additional experience by continuing to fight. But perhaps you are going for a more peaceful play style. I have not found that Civ VI and R&F rewards peaceful play styles in the early game. You might want to consider a limited war to liberate Jerusalem and take down some of Sumeria's military. Of course, those war carts can be annoying, so do prepare sufficiently if you decide to go this route.