Preheat oven to 350°. Cut 3 heads garlic in half crosswise, place on a large sheet of aluminum foil, drizzle with about 1 tbsp. oil, sprinkle with sugar, and season with salt and pepper. Tightly wrap foil around garlic and bake until soft, about 1 1⁄2 hours. Remove from oven, unwrap, allow to cool, then squeeze garlic pulp from cloves into a small bowl; discard peels.
Separate remaining head of garlic into cloves, and peel and slice each clove lengthwise as thinly as possible. Heat 2 tbsp. oil in a small nonstick skillet over medium-low heat. Add garlic slices and cook, stirring, until soft, about 5 minutes. Drain on paper towels.
Reduce oven to 300°. Place roasted garlic, half-and-half, cream, and eggs in a food processor and purée until smooth. Lightly brush 4 ramekins, 3'' wide and about 1 1⁄2'' high, with 1 tbsp. oil, then line the bottom of each with garlic slices. Spoon about 2 tbsp. garlic custard into each ramekin, evenly divide tomatoes between ramekins, then cover with about 3 more tbsp. custard.
Transfer ramekins to a roasting pan, place pan in oven, then add about 1'' hot water to pan. Bake custards until set, about 30 minutes, remove from roasting pan, and allow to cool for about 20 minutes.
Meanwhile, blanch chopped parsley in a large pot of boiling salted water until bright green, 20–30 seconds. Drain, allow to cool, and transfer to a food processor. Add 1⁄4 cup water and purée until smooth. Squeeze juice through a clean dish towel into a small skillet. Discard parsley. Warm juice over low heat, then whisk in butter and set aside.
Heat remaining 2 tbsp. oil in a medium skillet over medium-high heat. Add mushrooms and cook, stirring, until tender, 2–5 minutes, then adjust seasoning with salt and pepper. To serve, turn each custard out onto a medium plate and garnish with parsley sauce, mushrooms, and parsley sprigs.