A SQLite index on path and name would probably suffice, and might not be as ugly performance-wise as you think.
Hopefully for v8.2 or so, the source of truth will be JSON on disk instead of in SQLite. If so, please consider using a hierarchy where tag folders are actual folders on disk, UDT definitions and instances are one file each with contents ordered by name, and all other leaf tags in a folder are in a single JSON file, ordered by name.
Make all json diff-friendly with tidyjson/jsonlint/whatever.
Use "version sort" or AlphaNumComparator
so numbers in tag names are ordered the way humans like.
This above will be very git-friendly and, since each file will be sorted only when edited, should not present a performance problem at other times.