Sudden changes in diet, too much protein, worms, coccidiosis, bacterial infections, can all cause yellow, loose or foamy droppings. A few here and there is not uncommon, but continuing for more than a day is a bad sign, and I'm sorry you lost your hen. I never overlook the use of quality probiotics of the water dispersible type. They activate better in dechlorinated water. Probios is a very good brand.
I rarely feed meat besides occasional no-salt tuna, and prefer occasional milk protein as an animal type. The more room birds have, the cleaner soil you have without overpopulation of droppings multiplying bad microorganisms. I find myself deworming at least twice a year with birds 2 years and under. Preventative use of Amprolium in drinkers is a good idea after heavy rains have passed, and climate warms up, especially if loose droppings become more noticeable.
I keep drinkers clean at all times by keeping them high enough off soil so birds don't foul the water. Keeping wild birds and rodents away from yards and feeding stations is also a way to prevent sickness in the flock. It is a good practice to pick birds up off the roost at night. Compare weights of same breeds to see if any weight loss is noticed. Take a few minutes to watch them eat and drink first thing in the morning. All should be at the troughs eating, not lazily picking around. That situation often reveals which one may be ill, and you can keep an eye on them. I use Bandettes on my birds so I can easily identify each bird.