There are conditions where malnutrition can be directly connected to neurophaties. For example:
- due to lack of vitamin B1 like Beri-beri is responsible for a legs polyneuropathy which causes among other things gait disturbance.
- B12 and B6 deficiencies can be the cause of migraines and seizures and in extreme cases permanent damages to peripheral and central nervous system
The list would be extremely long, whole books are written about it. To make it simple in your case the "loss" of a limb can be not that the limb falls off but that there is an impossibility or difficulty to use it due to nervous system damage.
The situation can be directly caused by malnutrition but more often than not there are conditions caused by malnutrition that can, in turn, affect a limb (think diabetes). And also its not just malnutrition in the subject but it can be due to mother malnutrition during pregnancy.
Obviously this would be derived from humans, I don't think there is real research on insect malnutrition, which can be a good thing because it gives you a lot of room to move.
You can resolve the economic problem of "if you have the money for a mechanical limb then why not just buy better food" with the mechanical limbs being built with items discarded by the rich, being outdated limb models or even that some particular food necessary for good health in the species is so scarce that its price is actually higher than a mechanical limb.
If this element was available to everybody in the past it can be that due to an actual decline in its quantity overtime but, as it happens, could also be that the quantity of it stayed the same while the population increased dramatically so the price skyrocketed as demand increased.
You can also build your society in a way where the poor conditions of these "people" force them into jobs for what mechanical limbs become necessary/ advantageous and are actually fitted on them by the company/ corporation/ government. In this case you could add poverty onto poverty by keeping their salary low because the organization doesn't give them property of the mechanical limb and they "rent" it through a deduction in their already low pay.
The mechanical limbs could even be taken back by the organization when the individual cant work anymore or dies and re-fitted on a younger worker that was just hired.