I'm not a writer but,
Sanji should've called Germa's bluff. If he doesn't come with, BM will kill them as well. Which leads to an opportunity for Sanji to work with his family to doublecross BM instead. At the wedding, it could've been a double-double cross, spiderman meme. It would make for an amazing reveal. Add Capone into the mix, Germa and BM fight each other, Zeff will be forgotten. Luffy and co get out scot free.
Alternatively, it doesn't have to be complicated. Sanji could've gave Zeff a last call, the logistics won't be that hard to explain. Tell him the truth and have an emotional goodbye. Tell Luffy the truth because he trusts his captain to crash the wedding. The wedding's sudden turn of events due to BM's planned betrayal turns out in Sanji's favor, Zeff is saved.
Or even simpler, keep the story the exact same but add consequences and change. Sanji acts more like an adult, less gag. Realizes the cruelty of the pirate world. Anything that shows a change of character so at least all that backstory and hardships wasn't for nothing.
My problem with the story was that Sanji did absolutely nothing, he did everything for the enemy and none of it for himself or Luffy. Why should the readers care about Germa and BM pirates? They are bad people. As readers, we are following the Strawhats, past present and future. We don't care about the citizens of WCI or Germa or Pudding because we'll rarely ever see them again. There are so many ways to write an empowering story for Sanji. Him and the Strawhats should be the main focus of WCI, Oda has lost sight of that and almost every arc post-timeskip has suffered because of it.