List all entries except 'hidden'
Not really the answer you are looking for, but it might be easier to change the tag hidden to a checkbox or lightswitch field and add a condition to the for..in loop, as explained in the twig documentation, which may do what you need and keep the query count lower.

{% for entry in allEntries if not entry.hidden %}
    ...
{% endfor %}