In a large mixing bowl, beat the softened butter and dark brown sugar with an electric mixer on medium speed for approximately 2–3 minutes. The mixture should look smooth, creamy, and slightly lighter in color. Scrape down the sides of the bowl as needed to incorporate all the butter and sugar.
Add the molasses, egg, and vanilla extract: Beat on medium-low speed until thoroughly combined. The mixture should be thick, glossy, and dark brown. Scrape the bowl again to make sure no streaks of molasses remain.
In a separate medium bowl, whisk together the flour, baking soda, fine salt, ground ginger, cinnamon, and cloves. Mix thoroughly so the spices and baking soda are evenly distributed throughout the flour.
Add the dry ingredients to the butter mixture in two additions, mixing on low speed after each addition. Stop mixing as soon as no dry flour remains. The dough should be soft, thick, and slightly sticky but cohesive. Avoid adding unnecessary flour. The dough will become easier to handle after chilling.
Cover the mixing bowl tightly and refrigerate the dough for 30 minutes. It should become noticeably firmer and easy to portion without sticking excessively to your hands. If the dough remains very soft, refrigerate it for another 10–15 minutes before shaping.
Near the end of the chilling time, preheat the oven to 350°F (175°C). Lightly grease all 24 cavities of a nonstick mini muffin pan with the vegetable oil. Pay particular attention to the sides of the cavities, since the cookie cups need to release cleanly after baking.
Divide the chilled dough into 24 equal portions, approximately 1 heaping tablespoon or 26 g each. Roll each portion gently into a ball and place one in each prepared muffin cavity. Keep the portions as uniform as possible so all the cookie cups bake at approximately the same rate.
Use your thumb or the rounded back of a teaspoon to press an indentation into the center of each dough ball. Gently push the dough across the bottom and partway up the sides of the muffin cavity, creating a small cup with relatively even walls. Do not make the bottoms excessively thin. The centers will puff slightly during baking and can be reshaped afterward.
Place the mini muffin pan on the center oven rack. Bake for approximately 13–15 minutes, until the edges look set and the tops are matte rather than wet. The cookies will already be dark because of the molasses, so judge doneness by their texture rather than waiting for a deep golden color. Avoid overbaking, which can make the cups hard and difficult to remove from the pan.
Remove the muffin pan from the oven: While the cookies are still hot, gently press the center of each cup with the rounded back of a teaspoon or the end of a small wooden spoon. The centers should give way easily, creating a defined cavity for the frosting. Press gently rather than forcing the spoon through the bottom. If a small crack appears along an edge, carefully press it back together while the cookie is still warm.
Allow the cookies to cool in the muffin pan for approximately 10 minutes. Gently twist each cup to release it, then lift it out and transfer it to a wire rack. If necessary, loosen the edges carefully with a thin, blunt knife. Let the cups cool completely for another 20 minutes before adding the frosting. The cookie shells should feel firm enough to handle without breaking.
While the cookie cups finish cooling, beat the softened cream cheese and butter together in a medium bowl until smooth and creamy. Add the sifted powdered sugar and vanilla extract. Beat on low speed until incorporated, then increase to medium speed and mix until light and smooth. The frosting should be thick enough to hold its shape when piped. If it is too stiff, add the milk 1 teaspoon at a time, using no more than the listed 2 teaspoons.
Transfer the frosting to a piping bag fitted with a large star tip. Pipe a small swirl into the center of each completely cooled gingerbread cookie cup, dividing the frosting evenly among all 24 cookies. Alternatively, spoon the frosting into each cavity and create a gentle swirl with a small offset spatula. Avoid overfilling the cups if you plan to transport or stack them.
If desired, finish the cookie cups with a light dusting of the optional cinnamon or a few pieces of finely chopped crystallized ginger. Arrange them in a single layer on a covered tray and refrigerate for approximately 20 minutes, until the frosting firms up. Serve slightly chilled or allow them to stand at room temperature for 10–15 minutes before serving.