Question: Torque seal is a lacquer-like product used in critical applications after a screw is tightened to provide a visual indication if the screw comes loose. Considering that a terminal screw on an electrical device coming loose can give you a Bad Day™, is it legal to use torque seal or an equivalent product (nail polish is said to work in a pinch) on electrical device terminal screws to visually indicate loosening? Or is there something in Code that would prohibit such a practice?

Answer: 
I don't know of any restrictions for the use you are proposing. In fact I have used it myself. Mostly for time clocks so if we can tell if someone is jacking with it.
I have never used this product, but often make a sharpie mark, which IME is a very common practice, and never raises an eyebrow. 

Since the amount is so small, I don't think there's a danger of fumes around the equipment while it cures, or introducing a combustible into the interior of the equipment. 

I think since there is no rule specifically restricting making identifying marks, labels, etc. inside the panel, there is nothing that prohibits torque seal on terminals.