Remove items in taxonomy entity relation on node edit form
You're deep in the field definitions there, that's the wrong place, you can't change anything there and you don't need to.

In case of a select, the available options are already part of the form; they should be in $form[$field_name]['widget'] somewhere.
You could also try to use hook_options_list_alter().