Attempting to merge in an array of items into Twig classes
Twig's merge filter expects an array as an argument, not a string.
Updating your for loop should resolve:
{% for item in content.field_category | children(true) %}
  {# Merge classes array with an array with one item, item #}
  {% set classes = classes|merge([item]) %}
{% endfor %}