One factor that nobody has mentioned is that the incident does not appear to have been premeditated to take place at the particular time that it did. How would the first officer have known that the captain would go to the loo at that particular time?
This is probably a case arising from an opportunity: The perpetrator waiting for a chance to be alone... not on that particular flight but whenever. It could have been a deay earlier or a week later. Sick Russian Roulette...