In my (admittedly pretty limited) experience arrivals can be a bit hit or miss.
But for what its worth, coming into JFK on the 117 I made a reasonably quick escape off the upper deck but then spent an hour in the immigration queue behind several hundred people who had just arrived off an ANA flight. Conversely, arriving into EWR I was second or third off the 185 and having a cigarette within 20 minutes. Good luck whichever you choose.