The short answer may be that, in the heat of the moment, a pox is as good as a plague. At any rate, ill-wishers have urged both "a plague on" and "a pox on" the objects of their ire for centuries past. Given the near interchangeability of the curse, even though it may not do to say that one man's pox is another man's plague, the opportunity to misremember Mercutio's line has always been present.
The first writer to commit the wrong curse to paper (according to a Google Books search) was the anonymous author of "Extempore," in The London Magazine, Or, Gentleman's Monthly Intelligencer (April 1772):
"While peers and commoners fall out,"
(Says one, who neither side espouses)
"Let me, with old Mercutio, cry
——A pox on both your houses."
Both expressions have fairly long careers, as this more generalized Ngram chart of "a plague on" (blue line) versus "a pox on" (red line) for the period 1600–2000 suggests:
Shakespeare used both expressions on multiple occasions, as enumerated in Alexander Schmidt, Shakespeare Lexicon and Quotation Dictionary, third edition (1902):
Plague, subst. ... 3) pestilence: ...Oftenest used in cursing: the red plague rid you! [Tempest] the plague of Greece upon thee! [Troilus and Cressida] a plague break thy neck [same] biles and plagues plaster you o'er! [Coriolanus] the hoarded plague o' the gods requite your love [same] a plague consume you [Timon of Athens] all the plagues ... light on thy daughters [King Lear] O plague and madness [Troilus and Cressida] the common file — a plague! [Coriolanus] more man? plague, plague! [Timon of Athens] plague on't! [Two gentlemen of Verona] a plague upon this howling [Tempest] a plague of all drums [All's Well That Ends Well] a plague of all cowards [Henry IV Part 2] a plague of these pickle-herring [Two Gentlemen of Verona] a plague a both your houses [Romeo and Juliet] .
Pox, the venereal disease: ... Mostly used as a light curse (and supposed to mean the smallpox; ... the pox of such fantasticoes! [Romeo and Juliet] the pox upon her green-sickness [Pericles] a pox of that jest [Love's Labour's Lost] a pox on him [All's Well That Ends Well] a pox upon him for me [same] a pox on't [same and Cymbeline] a pox o' your throat [Tempest] pox of your love letters, [Two Gentlemen of Verona] pox, leave thy damnable faces [Hamlet] show your knave's visage, with a pox to you [Measure for Measure] what a pox have I to do with my hostess [Henry IV Part 1].
Schmidt's list seems to omit the instance from The Merchant of Venice (cited in a comment by user159691), so it may not be exhaustive; my summary of Schmidt's collection above omits a number of citations not accompanied by specific quotations.
Other authors of the same era employ both forms of cursing as well. Indeed, Fletcher & Beaumont, Phylaster: Or, Love Lyes a Bleeding (1609) has one character use both expressions in the successive lines of a dialogue:
LEON. Well, tis a braue boy Gentlemen.
CLERIMON. Yet you'ld not beleeue this.
LEON. A plague on my forwardnesse, what a villaine was I, to wrong vm so; a mischiefe on my muddy braines, was I mad?
TRA. A little frantick in your rash attempt, but that was your loue to Phylaster, sir.
LEON. A pox on such loue, haue you any hope my countinance will ere serue me to looke on them?
CLERIMON. O very well Sir.
LEON. Very ill Sir ; vds death, I could beate out my braines, or hang my selfe in reuenge.
The preeminence of "a pox on" during the period 1761–1817 (suggested by the Ngram chart above) remains to be explained. But whatever may have caused that burst of popularity, the long continuance of both "a plague on" and "a pox on" in literary English (if not common speech) leaves both expressions tantalizingly available to anyone vaguely aware of the Montagues and Capulets and the trouble they called down upon themselves and fair Verona.