Carry enough clothing with you in your hand baggage to last a couple of days while your bags catch up with you. I would think that a three hour connection gap for immigration and customs at EWR would be sufficient but if I were changing airlines and terminals I'd prefer four.