There have been no nuisance lawsuits go to trial against Iowa livestock farms since 2008, in part because farmers have done an excellent job of caring for their animals and facilities, according to Eldon McAfee, a leading attorney for the state’s livestock farmers.

However, he said, Iowa farmers need to continue doing things right and working to establish good relationships with...