Make the cookies: Sift together the flour, ginger, nutmeg, allspice, cinnamon and salt in a large bowl.
In the bowl of an electric mixer fitted with the paddle attachment, combine the butter and granulated sugar and beat until creamy and light, 5 to 8 minutes. Scrape down the sides of the bowl with a rubber spatula so all of the butter and sugar fully integrate. Beat in the egg yolks, one by one, and then the vanilla. Gently mix the dry ingredients into the butter mixture until it forms a soft dough. Using plastic wrap, shape the dough into one log 10 inches long and about 2 inches in diameter. Chill until firm, about 2 hours.
Preheat the oven to 350 degrees F and line two baking sheets with parchment.
Bake the cookies: Unwrap and use a sharp knife to cut the logs into 1/4-inch-thick slices. Arrange the cookies 1 inch apart on the prepared baking sheets. In every other cookie, cut a hole about 1 inch in diameter with a small round cutter. Bake the cookies until light golden in color, 12 to 14 minutes. Set aside to cool.
Make the icing: Combine the confectioners' sugar and butter in the bowl of the mixer fitted with the paddle attachment. Beat until smooth, 2 to 3 minutes. Add the cream and rum and mix until blended.
Make the dusting sugar: In a small bowl, combine the granulated sugar, nutmeg, cayenne and lemon and orange zests. Set aside.
Assemble the cookies: After the cookies have cooled, put the icing on the cookies without holes (about 1 teaspoon per cookie) and top each with a cookie with a hole to make sandwiches. Don't press down. Place the tops on gently so the icing doesn't leak out of the sides.
Make the caramel: Heat the granulated sugar in a small skillet over medium heat, stirring occasionally, until all of the sugar melts. Once melted, do not stir but swirl the pan until the sugar is amber, about 6 minutes.
Drizzle each cookie with the caramel and top with the dusting sugar.
Recipe courtesy of Alex Guarnaschelli