Options beyond multiplexing

First there were 256 switches, now 400 feeders. Are you sure about what you want?

Anyway, let's assume you are. Now what output do those feeders produce? I assume they can tell how much food they dispensed?

Design a circuit for one such feeder, have it talk over RS485 (max 32 nodes normally). Bundle those together in groups, so you have 13 groups, and those in turn over a second RS485 bus communicate all their data to a central master.

Get it working, design a PCB, have it manufactured, test it very very thoroughly, produce 500 of the same (ask the factory to program the things for you). Use an ATtiny instead of ATmega to save a lot of cost. Install it all.

Make sure you have a big enough budget for this. You're going to spend a lot of time testing, writing software, testing, writing more software, installing, testing, trying another way of installation, fix wires that the cows ate, write more software, test again, etc.

Oh, and get some real expertise. This is not a beginner's project.