The id you are referring to is an ACF thing and may not always be the same. I do this as well so that I can give the containers of my flex field content ID values. What I do is add a text field that is read only and I populate that field with a unique identifier, very similar to the hidden field you are using. There is nothing built into ACF to do this.