I don't agree with this part, my lag continues until I relog:
"But if the player instead enters the pen, everything is suddenly normal: the lag goes away, the cows crowd around, and the lag does not return when he leaves the pen, provided the player is not still holding wheat."
My house is based over my cows, so the harvesting and relish issues I had last night is perhaps because the wheat ended up highlighted in my hot bar and they were sensing through the floor.
I'll add a video to support my lag after removing wheat from selection, I came across a lone pig in the field who didn't seem interested in a carrot either (although accepted it). Carrots also upset lag for the sheep and cows even though they do not pathfind to it - but not to the extent of wheat.
I am now running 1.2.5.12 on Xbox one and confirm the lag is still present. FPS is dropping to around 4.7 and not recovering without relog.