Well, I was sort of right, and it seems like you have already found what I am doing.
Note that I am using EPG Collector with DVB-T channels and collecting from the OTA EIT data.
The first image shows the definition of "Channel No.", which is also known as "User Channel Number". I think the column was automatically populated with the XMLTV ID by an EPG Collector scan. I'm not entirely sure, as I may have entered the values. See the first image, with the important column highlighted by the red arrow.
Then on the Output tab, set the "Format of channel ID" to "User Channel number", and tick the "Create an LCN tag containing User channel number". See arrows, second image.
As I use the XMLTV ID as my User Channel Number, MC matches up most channels no problem, whenever I do a new channel scan in MC, or in both EPGC and MC. The only exceptions are when there are duplicate channels, one HD the other SD, and only one EPG data stream. Or when there is no EPG data for a channel.
The resulting XMLTV file, "TVGuide.xml" header information looks like this:
<channel id="1">
<display-name>10 BOLD</display-name>
<lcn>1</lcn>
</channel>
<channel id="2">
<display-name>ABC</display-name>
<lcn>2</lcn>
</channel>
<channel id="3">
<display-name>SBS ONE</display-name>
<lcn>3</lcn>
</channel>
<channel id="7">
<display-name>7 Melbourne</display-name>
<lcn>7</lcn>
</channel>
<channel id="9">
<display-name>Channel 9 Melbourne</display-name>
<lcn>9</lcn>
</channel>
<channel id="10">
<display-name>10</display-name>
<lcn>10</lcn>
</channel>
You will see that the "Channel id" (XMLTV ID) matches the LCN in each case, which is the User Channel number in EPGC.
The matching happens in MC at the end of a manual EPG setup, from memory. It mostly gets it right, and allows you to change or add any mapping required.
Then "Options > Television > Manage Channels" allows you to see and change the mapping from Channel # to XMLTV ID as well.
That has worked for me for a long time. I haven't made many changes expect when channels have changed, and when the broadcast EPG data was downgraded.
I'm not sure all the above added much to what you already know. Also, my channel situation, except for the many, many changes we had a while back, is much simpler than yours. Particularly if you want to keep using the standard of, for example, BBC One London = Channel 101 (XMLTV Identifier is 6301), where your channel number is different to the XMLTV ID.