Combine the water and chopped piloncillo in a small saucepan over medium heat. Simmer, stirring occasionally, until the piloncillo has completely dissolved into a syrup. Stir in the cinnamon, cloves, and ginger. Remove from heat and let it cool until lukewarm.
In a large bowl, cream the softened butter and granulated sugar together until smooth. Add the egg and mix until fully incorporated.
Stir the baking soda into the cooled piloncillo syrup, then pour the syrup into the butter mixture. Mix well.
Gradually add the flour to the wet ingredients, stirring until a soft, slightly sticky dough forms. Do not overmix.
Wrap the dough in plastic wrap and refrigerate for at least 1 hour. This is essential for preventing the dough from sticking when you roll it out.
Preheat your oven to 350°F (175°C). Line a baking sheet with parchment paper.
On a floured surface, roll the chilled dough to about 1/4-inch thickness. Use your pig-shaped cutter to stamp out the shapes and place them on the prepared baking sheet.
Brush the tops of the pigs lightly with the egg wash to ensure a shiny, golden finish.
Bake for 12 to 15 minutes. The pigs are done when they are firm to the touch and the edges have turned a deep golden brown.
Transfer to a wire rack to cool completely before serving.