If an animal has a painful or scary experience the first time it enters a new place, then the fear memory is associated with the new place. But, if a painful or scary event happens in a familiar place which has previously been safe, the cow will most likely associate it with some other thing such as a person wearing a yellow raincoat. The fear memory will be associated with the raincoat instead of the place. The fear memory can resurface in any place the cow sees a yellow raincoat. Care must be taken to ensure that nothing bad happens to a new heifer when she first walks through the parlor.
Animals are naturally wary of new places.
If a new experience is suddenly shoved in the animal's face, it is more likely to be fearful. One of the best low-stress ways to introduce a new place is to allow animals to voluntarily explore it. In smaller dairies, heifers could be allowed to explore and walk around in the parlor before they freshen. In a large dairy this would probably not be practical. On a large dairy a person could be hired to pet and handle calves.