Love the analogy.
Openscad does exist.
Openscad has language bindings to at least rust and python.
Openscad is already embedded inside freecad.
It is a very good tool, that does a lot of things better than visual CADs. But it's not good enough to do everything better than a visual CAD. At least not yet.
I don't, however, have experience with the commercial products since I'm not a professional engineer.
Are there other shortcomings you have in mind?