I found a solution that is working for some folks but not for me. Any suggestions? I'm using Jira Cloud.
This clones everything that is linked directly to the epic. You could define the same rule-logic for the story-subtask relation ship.

Details of "Clone" Block:

If you are using Jira Premium you can also use "portfolioChildIssuesOf" to gather the tickets inside the epic which would also fetch sub-tasks.
However now you need to pay attention that your Automation does not try to link cloned subtasks to the new epic.