The steepest dive in cocoa demand in a decade has thrown into jeopardy a plan by top producers Ivory Coast and Ghana to guarantee some 2-million farmers a living wage, sources within the countries’ regulators said.