A: The basis of vaccination is to have controlled exposure of
the animal to certain proteins (called antigens) of the
disease causing agents. The animal becomes primed with an
immune response and prepares infection fighting cells and
circulating antibodies (proteins that stick to the antigens)
Later, when exposed to the disease causing organism, the
animal is prepared with an effective immune response against
the agent. Typically vaccination is done with killed
organisms or live organisms that are not capable of causing
disease.
Sometimes autogenous vaccines are prepared from disease
causing organisms originating from the same herd (as you
describe). However, unlike what you describe, autogenous
vaccines are prepared, or administered in such a way that
the agent is unable to cause disease.
Injecting bacteria-contaminated milk into the tissue of a
cow is not a good idea. I would expect the result would be
a bacterial infection and abscess at the injection site. I
am not aware of any clinical trials that support this the
idea. Rarely is vaccination useful for treating an existing
infection.