Any other suggestions for automating this?
Er, how about an algorithm ? :-)
Joking apart, you're on the right track (no pun intended). If it's any help, the EGLLADSB website works by looking at position, altitude, track, groundspeed and rate of descent, in order to deduce that an aircraft is landing at or taking off from Heathrow. It has also been enhanced recently to identify arrivals while they are still in the holds, but that's probably overkill.
Of course none of this should be necessary - if you're feeding traffic to the network, there's a server somewhere that has access to all this data already, and should already be doing what you have just described ...