I sympathize with your math issue....I can soooo relate!
However, since you mentioned you'll accept advice, here's what works for me (I'm down to my last few hundred hours until my last mill mastery, oh yeah, at level 80...ugh!)
I debated with with your same issue, but here is one thing the math (may) not take into consideration...how well will your product sell??? I mean, yes, you can make a ton of goat feed but the max price is the same as the cow (never knew why, but it is what it is). If someone is active on their farm with full a complement of barn animals, that means 15 sacks of cow feed each hour. As opposed to the goats which are what- every 8 hours. Plus, milk is the base product for so many other things that are needed constantly. (Oh cripes, that sounds like one of those dreaded "if the train A leaves the station @...and train B leaves the station@) - not going there!
So, what works for me: if I have time to tend the farm a lot, I produce egg and cow feed constantly (also what I personally need for my all my animals). If it's a time I know I'll be away from the iPad for awhile, I'll put in the longer duration feed which hopefully takes until I get back on line- so the mills keep turning toward that magical, far off number.
Also, all feed seems to sell well in the DD. However the players just starting out really need the chicken and cow feed, so I think selling that really helps them. I sell it all in increments of 5 (except chicken) because buyers barns are limited and there's 5 animals to a pen. Chicken feed I usually sell in increments of 6, since the max chickens per pen is 6.
I'm sure they'll be many more answers to your dilemma that will definitely help. As I said, this is what has worked for me.
Good Luck!