Clearly you’re tackling a recurring issue.
Recently @Tacha-S posted a similar package : Introducing launch-generator: A simplified launch description creation tool for ROS 2
I wonder how those two modules compare. Maybe you can mutualize the efforts ?