Near the end of Book I, chapter 17 of Our Mutual Friend (1864), Charles Dickens writes:
There are the beggars on horseback too, in another sense from the sense of the proverb. These are mounted and ready to start on the highway to affluence.
When I read this, I thought that the "proverb" Dickens was alluding to was "If wishes were horses, beggars would ride." But a note in the Everyman edition of the book says that the relevant adage is "Set a beggar on horse-back, and he'll ride to the devil."
A quick survey of Ngram Reader results reveals an instance of "if wishes were horses" from 1770, in Louis Chambaud, The Idioms of the French and English Languages (1770):
If wishes were horses, beggars would ride. Si souhaits fussent vrais, pouilleux seroient rois.
And much earlier, from James Carmichaell, The James Carmichaell Collection of Proverbs in Scots: From the Original Manuscript in the Edinburgh University Library (1628/1957):
And wishes were horses pure men wald ryde.
The word pure above stands in for poor.
Meanwhile, from W. Goodall, The Adventures of Captain Greenland (1752), we have this:
But there is an ancient saying, that, set a Beggar on Horseback, and he will ride to the Devil. Now, whether that Saying was verify'd here or not, we shall not presume to understand.
But we also seem to have a truncated version of the saying in John Trapp, Solomonis Panaretos: Or a Commentarie Upon the Books of Proverbs, Ecclesiastes, and the Song of Songs (1650):
The Crown of the wise is their riches; but yet give them a foole, you put a sword into a mad man's hand; the folly of such fools will soon be foolishnesse. Why? was it not foolishnesse before they were rich? yes, but now it is become egregious foolishnesse. [Greek quotation omitted] the earth cannot beare the insolencies of such. Set a beggar on horseback, &c.
But if they [good actors] once dare to grow insolent, if they behave themselves like Beggars on Horseback, and not only ride furiously as soon as they are up, but endeavour to ride over those very Persons who but the Moment before mounted them ; they ought to be us'd like Indians who run a-muck in their own Country, or like Dogs who run mad in ours.
All of these quotations suggest that the adages were thoroughly established at the time of the writers' citing them.
I have two questions:
Which of these two expressions is older?
Did they arise independently, or is one in some sense a retort to the other?