Step 1Bring a large pot of water to a rolling boil. As it heats, cut an X into the flat side of each chestnut. Add about 1 tablespoon of salt to the water, then add the chestnuts. Boil until tender, about 20 to 24 minutes. Cool, then remove the shells and inner skins. Set aside.
Step 2Tie the thyme, parsley and celery leaves together with kitchen twine. Set aside.
Step 3Melt 4 tablespoons butter in a large, deep skillet over medium heat. Add the garlic and cook just until aromatic, 1 minute, then add the chestnuts and stir until they are coated with butter. Cook 5 to 10 minutes, stirring often, until they are golden. Stir in the demi-glace and one-half cup water. Lay the tied-together herbs on top of the chestnuts. Lower the heat and simmer, stirring occasionally, until the chestnuts are almost soft and the liquid is reduced to a glaze, about 15 to 20 minutes.
Step 4While the chestnuts cook, cook the onions. Trim the stem end and cut a small cross into the base of each onion. Blanch in boiling salted water for 2 minutes. Drain well, then peel. Combine the remaining tablespoon of butter with the sugar in a small saucepan. Add the onions and cook, stirring, until they are glazed, about 2 minutes. Cover the pan tightly and cook until the onions are tender, about 15 minutes. Shake the pan occasionally to keep the onions from burning.
Step 5Cut the fennel bulb into julienne strips about 1 1/2 inches long and chop the fronds coarsely. Stir the strips into the onions and cook, stirring, until softened, about 5 minutes.
Step 6When the chestnuts are cooked, remove and discard the herb bundle. Stir in the onion mixture. Season with salt and pepper to taste. Just before serving, stir in the fennel fronds, adding some as a garnish.