Transportation from Narita Airport to Shinagawa at night
I'm going to Tokyo in May and will be arriving at Narita Airport (Terminal 2) at 9:25pm. I would have missed the last limousine bus and the last Narita express train by then. I see that I have another option which is to take the Keisei Electric Railway train from Narita to Nippori and then transfer to a JR train to Shinagawa.
Does anyone know if I should buy the ticket for the trains in advance or buy them when I arrive in Tokyo? And how can I purchase a ticket in advance? Would the train be crowded at that time? And what time would the last JR train leave the Nippori station? I'm arriving on a weekday.