Peel onions, halve and cut into wedges. Peel carrots, rinse and cut diagonally into 1/2 cm thick slices. Cut bacon into 2 cm pieces. Divide chicken legs at the joint. Heat oil in a roasting pan. Fry bacon in it over medium-high heat for 5 minutes and remove. Season chicken pieces with salt and pepper, brown all over in the drippings and remove. Fry onions, carrots and thyme in the drippings for 5 minutes. Drain sauerkraut in a colander. Mix sauerkraut and bacon in the roasting pan with the vegetables. Add 200 ml of water and bring to a boil.
Season with sugar, salt and pepper. Put the chicken pieces on the vegetables. Cover and braise in hot oven at 200ยฐ for 25 minutes (convection oven not recommended). Then cook uncovered for another 20 minutes.