Against Katakuri, it was a nice showcase of CoO, but Sanji stood no chance given Ichiji's standing. Niji saved his ass, and Ichiji was even stronger than that.
Against King, this is an actual even match. Any advantage King got was because Sanji was ignoring him and looking at Momo. We said the same thing with X-Drake: Sanji ain't gonna ignore someone superior to him like that.