I was excited to see mention of dir-locals-file-2 in NEWS, but then recalled that that feature was added and then removed because of performance issues.
km²~/downloads/:git/emacs> rg 'dir-locals-file-2'
ChangeLog.2
9419: (dir-locals-file-2, dir-locals--all-files): Remove.
9935: (dir-locals-file-2): New const.
etc/NEWS
360:See the variable 'dir-locals-file-2' for more information.
etc/DOC
46108:See also `dir-locals-file-2', whose values override this one's.
46109:See Info node `(elisp)Directory Local Variables' for details.Vdir-locals-file-2
lisp/files.el
3868:See also `dir-locals-file-2', whose values override this one's.
3871:(defconst dir-locals-file-2 ".dir-locals-2.el"