Your logic is flawed. I love my leather moccasins, but I'm not going to stick my foot up a cow's ass for an even better version of them. I love pussy, but I'm not going to cram a bunch of tampons down the front of my pants. Correlation does not prove causation.
No, but it doesn't disprove it either
Before I get to the OP, I'll lightheartedly and in good spirits, point out why in this case it doesn't match these analogies. Cows shit on the ground, someone or something picks it up, sterilizes it, and composts it. In the aquarium the fish shit in the water, bacteria completed the nitrogen cycle (this is the compost step), and there is no need for sterilization because the whole thing is in an isolated environment, and you will be using a commercial fish food which you know is uncontaminated. To your second analogy, I love my cat too, I certainly don't love his shit (just because it touches pussy, doesn't mean it is pussy
)
Anyway, to the OP. There was a post a while back where someone did something similar, He and I got into a 2 page discussion about it, and there is a lot of good info if you're interested (
https://www.rollitup.org/general-marijuana-growing/335318-fish-tank-weed-7.html). As mentioned, one of the keys is going to be ammonia, and you will have to take specific steps (like those I outlined in that other thread) to handle that.
You would certainly need a number of fish to produce larger volumes of nitrates, but goldfish are a bad choice. They like the water too cold. They don't handle the ph you want a hydro/aero system running at, etc. The best idea I have heard for companion fish are some of the south american's which live in soft slightly acidic water (and maybe take a whole day to acclimate), or female betas which are some of the most hearty fish you will find. Whatever you go with, carnivores are best. Best system I have seen before is where you have the res as a sump to a fish tank, and that sump feeding your hydro as well.
If it's not necessary to mix the systems then you can just put up a fish tank, gravel vac it for water changes, and run the removed waste through a cheese cloth, use that water to water your plants. Regardless of how you do it though, you will want test kits, since you have to know where you are at in nitrogen cycles, as well as test nitrogen levels of the water you use on your plants.
I have been keeping fish and invertebrates, fresh and salt, professionally and then as a hobby for some 20 years. If you have any specific fish related questions, feel free to PM me. You'd be hard pressed to come up with a question I didn't know the answer too