Overgrown toes will result from both causes. Install a foot bath in the exit alley from your parlor where all four feet of every cow will be exposed twice a day. Foot baths must be drained, cleaned, and refilled on a regular basis. They help prevent bacterial buildup and apparently help harden the hoof horn. Foot baths are highly recommended.
Rubber mats can give cows more confidence in walking through such areas.
Concrete grooving can also help. Dry feet have fewer foot problems. Make sure your free stalls provide such an area for your herd. Free stalls that slope toward the rear with neck rails adjusted so that manure falls in the alley are easier to maintain. Plan to trim feet on at least a few cows at regular intervals.