Holy Crap Fontforge does support Contextual Substitution! Somehow I thought I read somewhere in the documentation that it categorically didn't. Doubting Thomas that I am, I had to take his example font and generate an OpenType file from it and cram it down InDesign's gullet, and whaddayaknow, it totally works. I am about to, in the vernacular of our times*, pee all over the place with excitement.

*by "our times" I mean mainly madmadammim and phoebus

Oh, also, it kind of works in Illustrator if you turn a mysterious option or two on.