(1) You've me to thank https://books.google.com/ngrams/graph?content=You've+me+to+thank&year_start=1800&year_end=2019&corpus=en-2019&smoothing=3 (2) He's me to thank no results == Is (1) idiomatic but not (2)? Why? Wiktionary has a note that In most dialects, he’s as a contraction of he has is only used to mark the perfect tense (“He’s done something.”, “He has done something.”), and not to signify possession (“He has something.”). Some dialects, however, use he’s for both. but nothing on the discussion tab. I'm pretty sure my dialect can say "He's twenty bob on him." but I don't like "He's me to thank" Perhaps it's from a famous writer or quote from sometime before Google NGRAM first picks it up in 1878?
The "he's" in "He's me to thank" is a contraction of "he has", rather than the possessive, so I'd ignore the note in this case. "He's twenty bob on him." sounds off to me, but it might be a dialect thing, as you say. Both phrases sound better to me with a "got" thrown in: "He's got twenty bob on him" "He's got me to thank"
I think the note says some dialects don't contract he has to he's. There isn't a corresponding note for you've. I'm not sure how reliable these notes are on wiktionary compared with a proper dictionary - but it's then that most dialects find (1) idiomatic but not (2). And there might be no attestations for "he's me to thank" so even in the dialects where "he has" can contract the usage I want has never made it into anything published on Google Books.
Use it if you want to pioneer fresh wordage like a modern-day Shakespeare. I mean, Joyce got away with it. I suppose it all depends on if you can pull it off, and if the work it's embedded in feels experimental and playful enough. Of course, many people will never accept anything fresh and new. Assuming there are other examples of words used in a playful or creative way like that (in the same piece), then it should work.
I suspect this usage isn't much younger than Tudor-day Shakespeare as it is https://archive.org/details/in.ernet.dli.2015.120829/page/n129/mode/2up (6th column, point 7) uton we foþon zeþencean hwyle handlean we him forþ to berenne haban = let us consider what recompense we have to produce for him This is have +infinitive expressing obligation. The word order is then reversed to bring forward the accusative. I don't know the term for that you've to thank me ≠ you've me to thank plates to wash ≠ to wash plates It's then contracted. But for some reason only you've + acc + to is in the language. The question is why. Without the accusative brought forward, the idiom seems fine:- He's to put on his shoes and get in the car You've to be a good girl and take the basket to your nan And these also seem fine with the accusative brought forward:- You've a basket to carry He's a hat on his head and a ringing in his ears But I think the second is less idiomatic than the first (this starts to become like an optician's test) He's a hat on his head and a ringing in his ears He's me to thank for both The first one is perhaps helped because the run-on prevents us hearing "he is a hat" You've a hat on your head doesn't have this potential confusion. He's me to thank for both benefits from the context. Despite this it's nowhere in Google Books. Going back to the Anglo-Saxon usage, there's someone in Korea also troubled by this: https://2022jellaconference.weebly.com/uploads/7/2/1/6/7216201/발표원고-신성균.pdf "In Present-Day English, the have + object + to-infinitive is marked, and the have + to-infinitive + object is unmarked as a result of the change of markedness because of the ambiguity of the have + object + to-infinitive, in which have is possessive or obligatory, violating the AVOID AMBIGUITY STRATEGY." So I guess the problem is internet readers now have these goldfish attention spans. They see He's a hat
Ya almost gotta be British though... (Americans did speak like that until maybe the 50's, especially the ones using the Transatlantic dialect) How about this—"I'vn't a dime, have you one?"
It's more of an English thing, much like @Xoic already mentioned. Americanized, it would sooner be "You('ve) got me to thank" which makes the He-version work, too. Though, if I had a character say something like this, I think I'd sooner go with "thanks to me" but that entirely depends on context, of course. And I'm neither English nor American, so that's a factor, I suppose.