This is the classic English apple, introduced into the United Kingdom in 1825. Dahl writes evocatively of the apples hitting the roof of Danny's wagon as he is going to sleep. Many readers will be familiar with the taste and smell of these apples, and they help to emphasise the feeling of the rural English countryside that pervades the book.
Dahl was bullied whilst at school and suffered physical violence at the hands of his teachers, in particular a Captain Hardcastle. It is likely that he drew on his own experience to create Captain Lancaster.
Dahl frequently used his own negative experiences to create characters in his books. Miss Trunchbull in Matilda is based on a Matron he encountered whilst at Repton School.