I have heard a number of rabbis use the punishment of the serpent as an example of how Hashem distances a sinner by giving him all that he requires. When someone has all that one requires, one has no need to connect with Hashem. In this case the Rabbis say that the snake eats dust, and dust is found everywhere. I know that the Torah is accurate, and I also know from studying biology and experience that there is no snake whose food is dust - all snakes are carnivorous and hunters. My conclusion is therefore that the Torah did not mean to say that the snake’s food is dust, but since he crawls in the dust, the dust mixes in his food - something which is interpreted as disgusting in the human mind, and can be understood as a fitting punishment. The rabbis’ message is good, but it seems that the serpent’s punishment is meant for different messages.
It may be that the midrash meant simply that the serpeants food is readily available, like the dust.