The extension ID is literally hard coded in the code of the scheme hiding code. https://source.chromium.org/chromium/chromium/src/+/master:c...
You cannot compile Chrome. I've heard that Chromium can be compiled and run, but I've never actually seen it, or hear of anyone using that professionally.
There are other factors at play which mitigate the preferential treatment, but it's definitely there in Firefox as well.