If using chiles de árbol, put them in a bowl, cover with boiling water, and let soften, about 30 minutes. Drain and mince.
Food processor method: Combine the salt, garlic, shallot, chiles (or cayenne and red pepper flakes), lemongrass, ginger (or galangal), red miso (if using), and vegetable oil, and purée until smooth. Transfer to a bowl and set aside, or store chilled in a sealed container (the paste will keep for a week). Finish following the instructions below.
Mortar and pestle method: Pound the salt and garlic with a pestle to a fine paste. One at a time, add the shallot, chiles (or cayenne and red pepper flakes), lemongrass, ginger (or galangal), and red miso (if using), adding each item only after the preceding one has been incorporated. Add the oil slowly, pounding to make a smooth emulsion. Transfer to a bowl or store as above. Finish following the instructions below.
Finish the sauce: Up to two days before serving, heat a large skillet briefly over high heat. Add the paste and stir-fry until fragrant, about 30 seconds. Reduce the heat to low; add the peanut butter, sugar, and fish sauce; blend well. Whisk in the hot water, a tablespoon at a time, until the sauce has the consistency of thick soup. Turn off the heat and add the lemon juice. The sauce will look separated; this is fine. Taste for a balance of salty-sweet-tangy and correct the seasonings if you like. (To reheat, warm in a saucepan over low and then add lemon juice and warm water to thin if necessary.) Transfer to a bowl to serve.