Field Template Loop Counter Override Problem
I just tested this and it works for me:

   {% for item in items %}
        {% set counter = ( counter | default(0) ) + 0.2 %}
        &lt;div{{ item.attributes.addClass(item_classes) }} data-depth="{{ counter }}"&gt;{{ item.content }}&lt;/div&gt;
      {% endfor %}


This renders as:

&lt;div class="field field--name-field-gallery-ref" data-depth="0.2"&gt;
...
&lt;div class="field field--name-field-gallery-ref" data-depth="0.4"&gt;
...


Note, I did not get the repeating depth numbers as you did above.