(Re-posting as an answer what I wrote in comments.)
According to compiler docs, the part of the magic number after X
is a number which grows monotonically with versions of the compiler. So, to find out what was the version of OCaml when Caml1999X023
was in use, you can try running your bytecode against various versions of OCaml, by dichotomy; or you can reverse-engineer the compiler by looking at the history of this source file or that one, which is where the magic number is set (I searched for the word ”magic” with the GitHub search bar).
I did it for you: looks like your magic number has been introduced by these 2 commits in April 2018: 1, 2. According to the description of the first one, your version is 4.07.0 — which is consistent with OCaml’s timeline.
I can’t tell why trying this version failed for you. I don’t know the answer to your question about js_of_ocaml-ppx
(in comments).