As OP points out log_format order it's indeed very important, in the case of custom log_formats, if you place in the same dir both types files, some files with log_formats, some files with servers blocks that make use of those log_formats, result will be a highly unrepeatable configuration.
At work when we first moved our hand made nginx farm into puppet, we started to see some nginx installations from scratch to fail in an identical hardware/setup, after a lot of debugging bizarre situations like having two /etc/nginx/* (-r) with an md5match and same binary producing different results (invalid log_format error on one and working on other), we learned the hard way that order it's indeed very important for some directives like log_format.
We fixed the issue by just moving server blocks generation out of conf.d/* into another folder included after conf.d/*.