Line two cookie sheets with silicone baking mats or parchment paper.
In a large bowl, beat the butter with the sweetener until lightened and fluffy. Beat in the espresso powder and vanilla extract.
Add the almond flour, ground coffee if using, xanthan gum, and salt, and beat until the dough comes together.
Sprinkle a work surface lightly with additional almond flour and roll the dough out to about ¼ inch thick. Use sharp cookie cutters to cut out to desired shape or size. (This recipe will make about 30 2-inch cookies).
Gently wiggle an offset spatula under each cookie and place on the prepared baking sheets at least 1 inch apart. Re-roll the scraps and cut out more cookies until you can't cut out any more. Freeze 1 hour.
Preheat the oven to 300ºF. Bake the cookies (from frozen) for 20 to 25 minutes. Remove from the oven, turn the oven off and let cool 10 minutes. Then return the cookies to the warm oven until completely cool, keeping a close eye on them. (If your oven holds onto its heat well, proper the door open just a bit with a wooden spoon).
In a heatproof bowl set over a pan of barely simmer water, melt the chocolate with half of the cocoa butter, stirring until smooth.
Dip half of the cooled cookies partway into the chocolate and set on a waxed paper lined sheet. Sprinkle lightly with a little coarsely ground coffee, if desired.
Repeat with the white chocolate and the remaining cocoa butter. Refrigerate the cookies until set.
This recipe makes about 30 cookies if using a 2-inch cookie cutter.