If I recall correctly, the one you want to avoid is the BA177 which leaves LHR at about 13.30 and gets into JFK at around 16.05.
Racing the bird to the gates at JFK are a UA777 from LHR (a.16.00) and (on some days) another UA777 from NRT (a.16.30). If the bird's running late or the UAs are early, you'll be taking your place behind 500-600 pax in the queue.
I've always found EWR a very pleasant and painless immigration experience (relatively speaking).