A variation of epoxy marketed as plumber's epoxy can be used on objects constantly exposed to moisture. Use only epoxy rated for plumbing when repairing cast iron pipes or troughs, since epoxy typically contains small shavings of metal, sometimes iron. If the epoxy is not designed for regular exposure to moisture, these metal shavings can corrode and cause leaks or breaks.
If you are patching a hole or crack in an area, such as a cracked gas tank, that is exposed to a specific chemical, make sure the epoxy product you purchase is rated for usage in that environment. For instance, a crack in an engine block is exposed to anti-freeze and lubricant, so the epoxy must be safe to use under those conditions.
Epoxy is not typically designed for a high-stress environment. If you are considering epoxying a weight-bearing joint or beam, ensure that the epoxy is designed to be used in that application. Epoxy is a useful tool, but it is no replacement for a real weld where cast iron is placed under high stress.
Repairing a cracked, cast iron skillet or Dutch oven is not a good application for epoxy. Epoxy can continue to release harmful chemicals even after it has cured, so avoid bringing it into contact with food, especially under high heat. Additionally, check the toxicity precautions on epoxy that you plan to use on cast-iron water pipes that lead to sinks and showers.