I asked similar questions about black flies several years ago. The biggest concern is what chemicals are used in the traps attractant. If it’s something you’d be ok with your chickens (and by extension through eggs yourself) consuming, then it’s fine.
I like the water trap idea mentioned in...