Farm equipment makers and tech firms are pouring billions into automation and artificial intelligence to improve the efficiency of farms and minimize environmental impact.