Originally Posted by
intuition
You should be in the airport when submitting the declaration
I read that differently. I'm sure CBP doesn't really care if you're on the tarmac being bussed from the plane, in the gangway to the actual terminal building or sitting in the plane a hundred meters back waiting for the gate to clear.
What matters is that you are practically guaranteed to be in the CBP queue in the next 4 hours, which is the validity of the form once filled. If one were to fill the form before take off or during flight there's always a risk of irrops. Once wheels on the ground in destination the risk of having to go to a different airport is virtually none.