What do you mean by hard to read? Any parsable expression should not be harder to read than the string version since they are exactly the same.
This is only true for people that strip the line numbers.
You could do this at build time instead of precompilation time. Or if your goal is only to generate code once at development time and review the code to be published as part of your sourcecode then yes string processing is fine and there’s little to do with julia (i.e. you could do that processing basically any language). You could store a binary serialization of the code to be evaluated at runtime but that’s not really necessary.