Fish don't get dropsy or intestinal infections from over eating or being fed a lot of food.
Internal infections/ dropsy is usually caused by bacteria damaging internal organs. The most common cause if rotten food or polluted/ contaminated food.
Live bloodworms (Chironomid midge larvae) and Tubifex worms that have been collected in sewerage farms, or areas with agriculture run off, or in industrial areas have been linked to intestinal infections in fish that have eaten them. @PheonixKingZ
Feeding high protein meat diets to vegetarian fish can cause bloating and dropsy. Vegetarian fish have longer digestive tracts than predatory fishes. So if the vegetarian fish eats a lot of meat food, it can rot in their intestine before it is passed out. This is sometimes seen in Tropheus cichlids from the African Rift Lakes, and a few other vegetarian fishes.
-------------------
If fish are exposed to chemicals it can damage their liver and they can swell up and die from liver failure.
Avoid using chemicals unless you absolutely have to, keep the tank clean, and avoid using contaminated water to prevent liver failure in fish, people and other birds and animals.
-------------------
All algae eating fish need driftwood and algae in their tank. They need driftwood to help with digestion and algae as food. They can have other food in addition to these, but they need driftwood and algae in their tank at all times.