There has been a lot of work on this over here: https://forums.pcsx2.net/Thread-No-interlacing-codes
As you say, it needs a different approach for each game. Some of the codes in this thread work on real hardware (definitely Enthusia does), but many don't.
I'd love to see more done on this, but...