Most accidents are a succession of errors and yes that can start in planning or the walk around or even a row with the wife.
Some like flying into a mountain covered in cloud is obvious pilot error but aircraft failures??? There is an argument that flying is easy and its when there are problems that we earn our money as pilots.
A lot of training is learning to deal with aircraft failures and in some ways we are expected to deal with those.
In that sense failure to deal with aircraft failures is also pilot error
Pace