OBIHIRO, Japan—It’s milking time at the Kato farm, but when a Holstein ambles into the milking pen, nobody is there. A robot shoots out four arms and attaches a suction tube to each teat while she enjoys a tasty treat. Within 10 minutes, it is the next cow’s turn.

The Kato family invested about $2 million to build a shed that relies on a pair of $230,000 robots to milk some 90 cows and an $18,000 robot to help feed them. Here on the northern island of Hokkaido, whose flat farmlands laid out in neat grids resemble Wisconsin...