If you’re still looking for information on this.
ACF stores the gallery field as an array (serialized data) of the image IDs.
The order of the values in the array is the order that the images are sorted.
The postmeta meta_key is == to the field name.