Worth crediting arubi (aka fivepiece) for this basic idea (one of several similar interesting ideas he came up with a few years back): https://gist.github.com/fivepiece/f39de978f5fb94b08b54f33db5e42d9a
Interesting and fun example!
(oh i see the code does credit fivepiece so all good)
The idea of pubkey recovery used to make covenants is discussed here: https://arxiv.org/pdf/2006.16714.pdf Section 4.1-4.4 has an interesting summary of how it could work and why it doesn't work (circular reference problem), as well as then discussing a bit other possible solutions including ANYPREVOUT as you mention.
Thanks, yes I do have the link to arubi/fivepiece's gist in the code, but I should have made it more prominent, especially in my earlier comment here.
Thanks for the other pdf link as well.
reply