So I found this very helpful article how you can do workaround in Jira so that the epic inherit values from its parents.
The small problem with the solution is that the "Rule configuration 2" triggers so that all child issues (epics) will inherit values from its parents. This is problematic if you have a use case where you only want the epic you changed to inherit from its parent.
So I modified the solution so only the epic you triggered will inherit values from its parents.
In order to do that I need to pass the key of the initial epic to the next automation. For Rule configuration 1 I added the key to the comment so I can read it in the second automation where it originally came from. Change the comment text to
A new Epic issue was added to this parent issue. {{triggerIssue.key}}
In the Rule configuration 2 modify the Advanced compare condition to
Condition: contains
Second value:
A new Epic issue was added to this parent issue. PROJEKTKEY-
And then inside the Branche Rule modify like this:
"Parent Link" = {{triggerIssue.Key}} AND key = {{triggerIssue.comments.last.body.substring(49)}}
With this, it will only the original epic that triggered the automation will inherit the values from its parents.