custom hierarchical taxonomy and custom post type list contains surplus posts

Have a look at the Taxonomy Parameters for WP_Query. The argument you are missing is include_children, which by default is true, you need to set it to false to not include posts in child terms.

error code: 523