I don't think it is possible to put a branch name into a tree object, not without deep modifications to git, so I suspect your previous company developed a significantly different tool around it.
My previous company wasn't using native Git submodules.
I think you're right actually the submodules. You can associate a submodule with a specific branch, but it still records the hash like normal and you still have to manually update it.