Generate a structure only once within a custom dimension

I'm making an outer space datapack and I would like my custom ship structure to be placed only once whenever the space dimension is first generated! (Similar to the end island portal or spawn platform)

I've attempted to use /place structure but it always has a random rotation and I can't load the structure using a structure block because the structure nbt file for structure blocks isn't stored within a datapack.

Any ideas would be helpful! Maybe a way to keep the data for a dimension within the datapack? idk.

Continue to help post