Restrict component usage in certain container

Our client currently has multiple containers where components can be added.

One of their containers is the footer container and they have a request to block the inclusion of certain components inside of that container.

Is there anyway i can make a change in the configuration to exclude certain components to be added?
Or when rendering a component, is there a way to determine the container the component is placed in to inform the content author that he/she should move the component to another container.

    jcr:primaryType: hst:component
    hst:template: base-footer
      jcr:primaryType: hst:containercomponentreference
      hst:referencecomponent: base/footer