I think what you’re really looking for is MetaOCaml: BER MetaOCaml
It’s begun to lag mainline OCaml more and more, so I’m not entirely sure of its status, but it has the sorts of facilities you’d expect for lisp-esque metaprogramming and code generation.
Alternatively, @Chet_Murthy posts frequently re: his experiments with more powerful/integrated quasiquoting and such in camlp5; I haven’t tinkered in that direction before, but it might be of interest.