Much of my government career was working for the US border agencies. From this, I learned that the questions concerning your having been on a farm or caring for farm animals are related to acquiring and transmitting diseases that could potentially affect the agricultural industry in your home country.
At US borders, the officials would rinse the bottom of your hiking boots with a fungicidal and anti-microbial solution. But as others have pointed out, this consumes time, especially when you are tired and just want to get home.
My personal advice after three Caminos, and nearly 30-years professional experience, is to do these things:
- Obtain a small, stiff plastic brush, the size used to scrub garden vegetables over a kitchen sink. I found mine for one euro in a China Bazaar in Santiago de Compostela. In your last accommodations before flying home, scrub and rinse the bottom and sides of the boots with soap and warm water. In all likelihood, you will not have caked on dirt or animal manure on your boots anyway. But the washing will certainly make the boots look like you just used them to run errands about town.
- Wear the boots on the plane home so they are readily viewable. Optionally, obtain a plastic bag from a supermarket in Santiago, large enough to hold one or both your boots. PACK THE BOOTS AT THE TOP of your carry-on or checked baggage. This way, it is easily accessible if you choose to tell the authorities that YES, you have been on a farm. Technically, and in my direct experience, you have not been ON a farm. You merely walked through it. At no time did you intentionally look for manure to stomp through...seriously?!
- When asked the question, either on paper or in-person, and having already washed your boots, simply and truthfully, answer NO to the questions regarding having been on a farm or caring for farm animals. In this instance, you could still be referred for "secondary" processing, but nothing will be found because you followed my advice in #2 above and washed the boots.
After my first Camino, I answered yes, then verbally explained the exact activity I was engaged in, hiking through the farm village, but not intentionally stepping in anything unpleasant. The officer just smiled and said that was not what the question meant. I KNEW that, but wanted to be told that and passed on.
After my second Camino, I answered no, but cleaned and wore the boots on the plane home as mentioned above. There were no issues.
After my third Camino, I cleaned and packed the boots as described above, answered no, and had no repercussions.
I hope this helps.