The reason for two past perfects (had written/had never replied) is because in the whole sentence your point of reference in time is 'yesterday'. Both actions 'had written' and 'had never replied' can be viewed in relation to your point of reference 'yesterday' - not in relation to each other. That's why two past perfects works. With regard to your last sentence, 'I had been watching TV' is better than 'I was watching TV' because it is very clear that by using the past perfect continuous, you are indicating the reason for waking up at 8am, and that this was before. When you use the past continuous (in this context) it has the feeling of being 'in the past' ie. at the same time as 'I woke up' as opposed to providing the background to the past action 'I woke up'.
Hope this makes sense and helps,
Student or Learner