Since we are talking about agriculture I wrote the code for this machine in the 1990s and it's still in use. I know a newer version was created for the 68HC12 by my friends at Microtronix but the video is showing an older machine.
https://www.youtube.com/watch?v=wD6nHBVyOuY
It ran on an 8Mhz 68HC11, 16K ROM,8K RAM using an timer interrupt for the electric eyes that count the birds, and 3 other tasks running cooperatively. The robotics control for the boxes, re-directors and vaccine hood, the front panel keypad and GAS plasma display task and a subset of the Forth interpreter was running via RS232 or RS422.
It also has a simple database that kept a record of the "FLOCKS" (incubator output) of birds that were counted for the each shift.
The original SPEC was to count 40,000 per hr with 99.9% accuracy. (1 in 10,000)
We eventually got it up to 90,000/hr with some signal processing improvements in the ISR for the counting signals.
It was running a very traditional ITC Forth system but I used assembler words here and there to speed up critical operations. The ISR was 100% assembler.
Not sure what you are doing, but this gives you a view of what can be accomplished using Forth methodology even with low resources.
With today's optimizing Forth compilers and amazing hardware I can't imagine requiring a custom CPU.
By the way. I am vegetarian now. :-)
BF