Heat the olive oil in a skillet over medium-low heat. Add the sliced onions and cook, stirring often, until soft and deeply golden, about 20 to 25 minutes. If they begin to stick, stir in a tablespoon of the beef broth. Set the onions aside to cool slightly.
Heat the oven to 375°F. Lightly grease a 12-cup muffin tin. In a large bowl, combine the ground beef, onion stuffing mix, egg, ¼ cup of the beef broth, Worcestershire sauce, thyme, salt, pepper, and half of the cooked onions. Mix gently until combined.
Divide the beef mixture among eight muffin cups, packing it lightly. Stir together the ketchup, Dijon mustard, and remaining ¼ cup beef broth, then spoon the mixture over the muffins. Bake for 20 minutes.
Remove the muffin tin from the oven. Top each meatloaf muffin with the remaining cooked onions and shredded Gruyère. Return the pan to the oven and bake for 8 to 10 minutes, until the cheese is melted and the meatloaf is cooked through.
While the muffins bake, place the potatoes and garlic cloves in a saucepan and cover with water. Bring to a boil, then simmer until the potatoes are tender when pierced with a fork, about 15 to 20 minutes. Drain well.
Mash the potatoes and garlic with the warmed milk and butter until creamy. Serve the meatloaf muffins hot with the garlic mashed potatoes.