Would be straight out of sci-fi.
Robot horticulture has long been a staple.
Considering how wrong they were on other important matters the battery explanation could easily be wrong and the CPU correct.
I'm paraphrasing, but Neo says "that's impossible (in reference to the Matrix) since it violates the laws of thermodynamics"
To which Morpheus replies "and where did you learn about the laws of thermodynamics?"
If you're in the Matrix, your knowledge of the Matrix would come from the Matrix itself which would have a bias towards falsifying information to preserve itself.
One other thing I've read is that annual plants were the easiest plants to domesticate because the short life cycle results in faster evolution. However perennials are likely way less environmentally destructive.
What will all these people do once farmers are unnecessary?
There aren't that many people working on farms in developed countries. In the US, only around 3 million people (or <1% of the total population) work on a farm. [0]
In other countries where many people are involved in agriculture, the pending industrialisation/automation of farming will probably have a similar impact to what happened in North America and Europe over the 20th century: more people will move to urban areas and add value to the economy in other ways.
[0] https://www.agcensus.usda.gov/Publications/2012/Online_Resou...
The answer is "whatever they want". The big problem facing governments everywhere right now is how to jump over the little gully of poverty that comes right after the change to get there.