An automatic crop farm uses a farmer villager, a water push system, and hoppers to collect drops.
Build a field of farmland either 9x9 or a long row. Place a water source in the center that can be toggled with a piston or using the honey-block water-gate trick.
Let a farmer villager collect the crops and resupply the field. When it has planted its inventory full of seeds and wheat, it will throw surplus out of its inventory toward nearby players or a hopper minecart.
Route a hopper minecart under the field to collect thrown items into a chest.
For a fully hands-off design, use a Redstone timer to fire the water every few minutes to wash ripe crops into the hopper, then the farmer replants.