What was the first Lego tie-in film or television production?
I think you already answered your own question: The The earliest Lego television production is Edward and Friends from 1987 that showcased the Fabuland theme.
From the Wikipedia page:

It was Lego's first foray into animation and television in general.