cannot create product attribute (taxonomy) and add terms on the same execution

In the end I added a quick check with

taxonomy_exists($slug)

and if it doesn’t exist before adding the terms I use

register_taxonomy($taxonomySlug, 'product')

This seems to have allowed creation of all terms in one go.