In chapter twelve of his book Guns, Germs, and Steel, author Jared Steele asserts, as you say, that “food production precedes the development of writing.” He makes this reasonable assertion based on the fact that people in every culture had to feed themselves before they could do anything else. Throughout history, and in more primitive cultures even today, human beings have had to spend an inordinate amount of time just producing and providing food. Until that basic need is met, people have no use for writing. (Even once that need was met, the only people who required some kind of writing would have been those who engaged in accounting or contracts for these goods.) Oral communication was sufficient to produce food, even cooperatively; when cultures began to sell, barter, or exchange food and other goods, they did require writing.
Writing is slow to develop, according to Diamond; it is much easier to copy (thus the reference to "Blueprint" in the chapter title) or adapt than to create. Writing became the work of scholars and scribes, not something for the illiterate population of workers. The next group in a culture who learned to write were the rich, who used writing to maintain political and economic power. [The Church was also guilty of using writing and the people's illiteracy to maintain its own power and wealth.] Only as a cultures grew more complex and as basic needs such as food were being met did the common people need to learn how to read and write.
According to Claude Levi-Strauss, whom Diamond quotes, the primary function of ancient writing was "to facilitate the enslavement of other human beings."