Are food rewards a good long term learning strategy? This could be a question for parenting SE, but I am looking to understand the mechanism, so I am looking for a core answer from a psychological perspective; without all of the cultural noise that comes with parenting techniques etc.
Example situation:
A 5 year old child is struggling learning to read and write, for whatever normal reason for that age. So they are losing interest in going to school and or doing school/home work. One option is to provide one on one supervision/encouragement and giving a small food reward‡ for say each letter or word written correctly.
My (simple) understanding is that Dopamine facilitates the 'get up and do something productive' drive, and we have dopamine released when we eat food. Or in cave man terms, Ug want's Dopamine hit. Ug get out of cave, hunt down some berries, Ug gets dopamine reward. Ug not die of boredom/hunger today.
Unfortunately in modern society with fridges and infinite scroll on Facebook this mechanism had been short circuited.
So will rewarding academic work with food help build the mechanisms for reward and help study concentration skills as a person gets older; or will this strategy short circuit and create an unhealthy dependency on food when studying/ loosing interest in study once they have had something to eat?
Or
What needs to be done to make this strategy effective, with positive long term outcomes?

‡ Lets assume the food is moderately healthy e.g., raisins, peanut butter on celery, pieces of fruit. Lets also assume the food is partly randomly given, so that the student doesn't always expect a reward, and loses interest as the first time they don't get a reward (Tip I heard for dog training).
Food rewards are effective and safe to use in principle.  But in practice...?
The non-caveman term for the process of using consequences to modify behavior is operant conditioning, and the specific use of rewards is called positive reinforcement:

Example: A father gives candy to his daughter when she tidies up her
toys. If the frequency of picking up the toys increases, the candy is
a positive reinforcer (to reinforce the behavior of cleaning up).

Notice the very specific phrasing of this example as an if, rather than an is - that is, food rewards are a reinforcer only if they work.  This means that in order to know if they work, you will have to try them out, it is not something that can easily be predicted in advance.
Positive reinforcement using a variety of different kinds of rewards (tangible rewards such as food, prizes, privileges, and intangible rewards, in particular social rewards such as praise, attention, and affection) are a mainstay of behavioral therapy (BT, including CBT).  If a parent consults a behavioral therapist for help with a child struggling with homework, then the therapist will likely start with an assessment that includes determining what reinforcers the child may respond well to, as well as possible obstacles to progress.
Behavioral therapy is commonly used with children, particularly children with learning difficulties such as autism.  Since autistic children may initially respond less favorably to certain kinds of social reward, other rewards such as food may be used in early sessions, though patients are ideally weaned off tangible rewards in favor of intangible ones before completing treatment.
Behavioral therapy using positive reinforcement is one of the most evidence-based and effective approaches in the field.  However, parents attempting to replicate this process outside the lab or clinic are recommended training, as they may run into a number of pitfalls.  As a starter on reinforcement training, I recommend the great, accessible, and very short book Don't Shoot the Dog!