( In response to your initial question) The service itself appears to be OK.The ground wire for your pump appears to be connected to the neutral bar. It is supposed to be connected to the ground bar.....
The thing about that article is it assumes the sub-panel is in the same building as the main panel. All I am trying to point out is that sometimes when the panel is in a different, completely separate building, the sub- panel has to be treated as a separate service entrance. As I said, that is very common in Canada, for example.Brian