hi @catani
The order of items in your board is just a visual thing, they can be reordered any time by the user and that would make your solution break. What I recommend is to add a dependency column to the subitems like this
and set the order of things by using the dependencies.
Now you can use this automation:

