Luffy Slept in a jungle with a wise old man and learned the secrets of haki. Zoro trained in a Dojo with a master. Sanji ran away from cross dressers trying to convert him and stole recipes. As a cook sanji stole and ran. And ran. And ran. And fought masters of Kenpo. And ran. And ran. Stole. And fought. The conditions of Sanji's training were if he got caught he lost his right to the 99 recipes. So he ran. Till he ran out of places to run then he flew. And then in the mist of running he fought masters of martial arts. He arguably only mastered haki through trauma. He had no sensei to train him. Just fighting and running hunger and insomnia to help him unlock haki.
The point being that his training was non stop. Not a chance to cook the recipes. Just steal them and run. For 2 years. No time to sleep. Just run. No time to smoke. Just run. No time to hide. Just run. For 2 years.
Zoro on the other hand was training with the worlds strongest swords man. He got to sleep eat and train. When fighting a stronger swordsman in training you could get hurt. Zoro probably spent more time getting bandaged up than Sanji spent Sitting still. Luffy Could sleep and eat and breathe even if for a short time. Sanji wasn't afforded those luxuries. If caught once it was over for him. Truly hell simply because it didn't stop.
In short the theory is as follows
Sanji's training was the worst due to its nature of being over any second and always being on the edge of losing and exhaustion. He is specialized in CoO because thats the one most available through trauma and not training.
The same way cobi unlocked his.