Manure HAS to be DECOMPOSED before used in the garden soil. You are correct about the residues in animal feces. What you do is find friends that you know who don't give their animals growth hormones and constant antibiotics.
Decomposed manure is used for TILTH, not fertilizer. Yes it does impart a bit of nitrogen, some manures more than others. My favorite manure is HUMAN poo that has been thoroughly decomposed so that it is chemically not at all the original product (mixed with sawdust). It is always decomposed and tested 5X because it is under federal control. This mulch is beautiful, smells wonderful and FEEDS YOUR SOIL organisms. Lots of nitrogen as well.
The downside to this particular mulch using human poop is heavy metals. Can't be used for vegetables. Yet there are tap waters, wilderness soils and fresh water that are full of heavy metals higher than this decomposed product. So sadly, I don't use this for my soils in the vegetable garden.
The other cool thing about human poo plus sawdust decomposed COMPLETELY and tested 5X before sold to the public IS; no pesticide residues, no weed seeds and no sticks, rocks, chunks of an errant piece of plastic. This product is hard to find. The company I worked with and used their mulch exclusively (I would not use bark or plastic and I could tell clients why down to the cellular level and if they insisted on bark, plastic, I'd tell them I won't do their job. Go find 'landscraper'). There were many of those clients, tough to sell human poo, grins, but mostly I could show examples of other yards that would blow them away. And my credibility was provable.
Animal feces will be full of weed seeds. Compost you purchase by compost making companies who recycle 'clean green' or lawn debris, yard debris do not have their compost tested. You will never know what is in that compost. Compost is added to topsoils to be sold as well. I have found topsoils and compost that I couldn't grow a weed nor a petunia in. Seriously. Homeowners are worse than corporations for pesticide pollution. That is a fact. They use pesticide for herbicides, herbicides for insects. They don't read labels and the instruction booklet. This is a big deal.
I also found by talking with the owner of Sawdust Supply in Seattle, WA that the poo they DON'T make into GRO-CO, they take out to the middle of the state to pump 15 to 20 feet BELOW the crops. Which, we know will not help those crops at all, should not be used for edible crops anyhoo and guess what? They are pumping it into the water table. This, by the way is what this company does, at this particular treatment plant that DOES allocate most of their poop to be mixed with sawdust and tested 5X before selling it (still cheap). So what the heck are other sewer and water treatment utilities DOING with all our poop? Good question.
Animal feces if completely decomposed is great to improve TILTH. Expect a few weeds. Do make sure you know the owners and their animal husbandry. I would not buy compost unless I am able to get a test of the chemistry. Making one's own compost to make enough for a simple vegetable garden is a pipe dream. I top my beds in the spring and fall with 2" of compost. I buy bales of compost that have the chemistry listed. It isn't always completely decomposed but it is the best I am able to get to do the job. I add a bit more nitrogen to offset the needs of the decomposers. I use my horse manure that I KNOW what it is composed of and has been decomposed for years. I never use manure as FERTILIZER. I consider the amount of fertilizer that manure adds but I never use manure as fertilizer. I do soil tests!
Just topping your beds with decomposed organic matter, manure you easily take care of the weeds and feed your soil organisms. Organisms that are critical for plant health as they work symbiotically with your plants. These micro and macro organisms in the soil aerate and mix organic matter into your soil for you, I never mix this stuff into my soil by myself manually after the first time of double digging and creating raised beds. (no lumber or structural stuff) These organisms do a far better job of mixing.
Fertilizer and pH and tilth are critical things to know if we want to grow plants. Humans don't make self sustaining ecosystems. We are forcing soils to produce food in mass quantities. Not 'natural'. So we humans have to be far more informed to be able to add ANYTHING to soils. You've got great questions btw!!