No one appears to override this on a per-parse basis:
https://codesearch.wmcloud.org/search/?q=setMaxTemplateDepth&i=nope&files=&excludeFiles=&repos=
So this is always exactly equal to the wiki global configuration, which is what should be used instead.
We can start by marking ParserOptions::setMaxTemplateDepth() @internal, and deprecate and remove it later.
Related to T317647: Deprecate ParserOptions::setExternalLinkTarget().