I am not sure farmer's markets are prepared, and perhaps could never be prepared, for the type of volume they would have to do to entirely replace grocery stores.
As someone who lives in a big city, grocery stores here are packed at all hours. There will be dozens of checkout lines open going through customers as fast as they can. There are a ton of grocery stores, too, with each one as busy.
Farmer's markets are clearly not as effecient at serving customers as a supermarket, which means they would be even more crowded. We would have to have a LOT more of them to replace all of the supermarkets, and they would take up a lot more space than the current supermarkets to serve the same number of people.
As a busy parent of a toddler, grocery shopping already takes up a lot more time than I want it to. I can't imagine trying to fit the extra time it would take to shop at a farmers market for everything into my schedule.
When we think about making some sort of massive change to the way we live our lives (like everyone doing all shopping at farmer's markets), we have to really think about what it would mean to operate at that scale. What might work great for you as an individual may not work for everyone in the world, if everyone were to change their behavior.