It is a mistake to think that farmers are poor people, they are even richer than office workers, business, if you live in my area. Just because they work in a struggle doesn't mean they don't have money. But society needs to have a gap between rich and poor, if everyone is equal, society will perish.
You are right, the higher the number of office workers in a society, the lower the salary. I have witnessed several cases of lawyers who were paid the minimum legal wage, or even no salary in the case of interships (in Spain, contrary to what happens in the USA, for instance, legal or financial professions have little prestige).
About the gap you mention, I agree that it is necessary, but it must also be balanced. The dissapearance of the middle-class will have nefarious effects.
Back on OP's question, IMO the modern role of the poor in the economy nowadays is, surprisingly:
to consume.