Filtering dynamic criteria with AND
This is untested as I dont have anything set that meets these conditions to try it out in, but I think you can use something like this:

{% set targetElements = ['and'] %}
{% for category in productSpecsCategory %}
    {% set targetElements = targetElements|merge([{ targetElement: category }]) %}
{% endfor %}

{% set entries = craft.commerce.products('footwear').relatedTo(targetElements) %}


Inspired by this answer.