I'm sure there's no amount of ads or social media that will rot your brain faster than trying to do programming in YAML.
replies(1):
You also have the possibility to use Node-Red for that.
This is just like when writing CI scripts for GitHub actions or Azure pipelines: the right amount of yaml (if it must be used at all) is to just invoke a program in some more expressive language than yaml.
I do use the (jinja) value templates in some places though.