Pat the chicken dry with paper towels. Season with salt and pepper.
Place the chicken into a deep baking dish. Add the onions and fresh thyme, and pour the wine over. Marinate for a minimum of 2 hours, or overnight.
Set the Instant Pot to sauté, medium heat. Add half of the oil and all of the bacon; cook until the bacon is crisp.Using a slotted spoon, transfer the cooked bacon to a plate.
Add the mushrooms and butter to the Instant Pot, and cook until tender and slightly brown, and until most of the mushroom-liquid has evaporated.
Add the carrots to the Instant Pot, and cook for another 2 to 3 minutes. Add more oil if needed.Transfer carrots to a plate using a slotted spoon.
Remove the chicken from the marinade - do not throw away the marinade - place chicken on a plate, and pat dry with paper towels. Add the remaining oil to the Instant Pot, and fry the chicken in 2 batches until just browned on all sides.
Remove the chicken from the Instant Pot, and add the wine marinade and chicken stock to the Instant Pot. Reduce by half by cooking on medium heat for about 5 minutes.
Once the liquid is reduced, add the chicken, marinated onions, thyme, mushrooms, carrots, and bacon bits.
Lock the lid in place, and set the Instant Pot to Pressure Cook on Medium High for 15 minutes. Let natural release for 10 minutes, and then move the sealing valve to “vent” for a quick release of the remaining pressure.
While the chicken is cooking, mix the cornstarch and water together with a fork in a small bowl; mix until well-combined.
Remove the chicken and vegetables from the Instant Pot. Add the cornstarch mixture to the wine sauce, and whisk to combine. Set Instant Pot to sauté mode and cook until the sauce thickens. Taste, and add salt and pepper as needed.
Serve the coq au vin with mashed potatoes, and sprinkle with fresh parsley.