Contrary to popular memory, Lord Farquaad does not torture the Gingerbread Man in Shrek.
Farquaad orders his henchmen to capture the Gingerbread Man ("Get him!") and bring him to Duloc alive. Gingy is interrogated—threatened with milk dunking—but not tortured. Farquaad's goal: extract the location of other fairy-tale creatures.
Gingy survives intact and reappears in sequels, perfectly fine.