Set sous vide machine to 74C/165F.
Heat up medium sized sauce pan on medium high and pour in red wine. Let simmer for 1 to 2 minutes to cook off alcohol. Pour wine in a bowl and place in refrigerator until cool.
Season chicken thighs with salt and pepper to taste. Place chicken in freezer bag with wine, chicken stock, mushrooms, and thyme. Remove the air through a vacuum sealer or the displacement method. Drop the bag in the bath for an hour and a half.
Remove bag from bath. Take chicken thighs out of the bag and pat dry. Strain the liquids with a bowl under to separate the mushrooms and thyme, catching the wine and broth. Discard the thyme.
Sprinkle bacon pieces in a large skillet over medium-high heat, stirring occasionally until browned and crisp, about 10 minutes. Remove bacon from skillet with slotted spoon and place on a paper-towel lined plate.
Crank the heat to high and place the chicken thighs skin-side down into the skillet. Cook for 1 to 2 minutes per side, or until browned. Transfer chicken thighs to a plate, and discard all but 1 tablespoon of oil/grease from the skillet.
Reduce heat to medium-high and throw the onions and shallot into the skillet. Cook until golden and caramelized, about 5 to 7 minutes. Place mushrooms, flour and butter into the skillet, and stir until everything is completely coated.
Pour red wine and chicken broth mixture into the skillet. Simmer until the wine is reduced and thickened, about 5 to 7 minutes. Set chicken thighs into skillet, and simmer 2 minutes longer.
Season with salt and pepper to taste, and garnish with delicious, crispy bacon.