Coq au Vin with Cocoa Powder

Ingredients:
1 (3 1/2–4-pound) chicken, cut into 8 pieces (legs and thighs separated, breasts halved)
Kosher salt, freshly ground pepper
1 large yellow onion, chopped
1 large carrot, peeled, chopped
1 bunch thyme
2 bay leaves
1 (750 ml) bottle red wine, preferably Côte du Rhône
3 tablespoons olive oil, divided
2 tablespoons unsalted butter, divided
5 ounces thick-cut bacon, cut into 1/4-inch pieces
8 ounces button mushrooms, halved
1 tablespoon all-purpose flour
8 ounces pearl onions, peeled
1 tablespoon red wine vinegar
1 tablespoon unsweetened cocoa powder

Instructions:
Season chicken all over with salt and pepper. Place in a large bowl and add yellow onion, carrot, thyme, bay leaves, and wine. Cover and chill, turning chicken once or twice, at least 1 day and up to 2 days.
Remove chicken from marinade (do not discard) and pat dry with paper towels; pluck off any aromatics still stuck to chicken. Strain marinade through a fine-mesh sieve into a large bowl and set infused wine and aromatics aside separately.
Heat 1 Tbsp. oil and 1 Tbsp. butter in a large Dutch oven or other heavy pot over medium. Add bacon and cook, stirring often, until brown and crisp, 5–8 minutes. Using a slotted spoon, transfer to a medium bowl.
Arrange chicken, skin side down, in a single layer in same pot and cook until skin is browned, 8–10 minutes. Transfer to a plate and arrange skin side up.
Pour off all but 3 Tbsp. fat from pot and increase heat to medium-high; reserve fat for another use. Add mushrooms and cook, tossing often and adding a splash of infused wine if bits stuck to bottom of pot are getting too dark, until browned and tender, about 5 minutes. Transfer mushrooms to bowl with bacon.
If bottom of pot is dry, add a tablespoon or so reserved fat and cook reserved aromatics, stirring often, until vegetables are soft and browned around the edges, 8–10 minutes. Sprinkle flour over top and cook, stirring, until flour is no longer visible. Return chicken to pot, arranging skin side up in a single layer, and pour in reserved infused wine (it should come just to the top of the chicken pieces; add water to get it there if needed). Bring liquid to a gentle simmer, partially cover pot, and cook chicken until an instant-read thermometer inserted into the thickest part of breast registers 160°F, 30–40 minutes.
Meanwhile, heat remaining 2 Tbsp. oil and 1 Tbsp. butter in a medium skillet over medium. Add pearl onions, season with salt, and cook, shaking skillet often, until onions are browned all over, 8–10 minutes. Add water to barely cover onions and partially cover skillet. Bring to a boil, reduce heat, and simmer until onions are tender all the way through, 15–20 minutes; set aside.
Transfer chicken to a platter and tent with foil. Strain braising liquid through a fine-mesh sieve into a large bowl; discard solids. Return liquid to pot and set over medium heat. Whisk vinegar, cocoa, and 3 Tbsp. braising liquid in a small bowl until smooth, then stir into braising liquid in pot. Bring to a simmer and cook, stirring occasionally, until sauce is slightly thickened and silky smooth, 5–10 minutes. Add pearl onions with cooking liquid and reserved bacon and mushrooms and cook until just heated through. Add chicken back to pot.