I suspect you are overthinking things in regards to border control screening of a Canadian citizen seeking entry into countries like the U.S. or the UK . . . I do not know much about UK policies or practices, but for entry into the U.S., those authorities will generally have immediate access to sufficient history of an individual's travel into the U.S., and associated status, that fact alone will be a dominate factor . . . recognizing that absent a history of travel into the U.S., otherwise, yeah, or so it seems anyway, the U.S. tends to discriminate if an individual was or continues to be a citizen of certain countries, despite their becoming a Canadian citizen and presenting a Canadian passport (and despite some redacted information on the face of the passport). But it is not as if the details in travel history into the U.S. will matter as much as the fact of there being a travel history and any negative events or decisions related to the individual. Which information will not necessarily be but nonetheless nearly always will be connected to the individual regardless what travel document, from whatever country, the traveler uses.
Distinguishing border control screening for countries like China . . . a rather different tale.
Beyond that . . . perhaps a Meanwhile III . . . it is worth noting and emphasizing the difference between what personal information that border, immigration, and other law enforcement officials CAN access versus what is routinely seen or screened. This is of course connected to and dependent on what personal information is captured, by which government body, since access to information depends on that information having been captured (historically a lot of individual travel history was minimally captured, and going back a little further, much of it only captured in passport stamps), and maintained. If the information was not captured, or not maintained, there is of course no access to that information.
But even in terms of captured and maintained information, there are variable portals of access. Some of the portals or access-paths are restricted. Which here too there is great variability from country-to-country. Indeed, there is so much variation it hardly makes any sense to wrestle with this subject outside the context of a particular country. Note, for example, this can be incredibly complex, since there are numerous countries like Canada which have highly structured information-access regulation within the government, related to measures to protect privacy, but also which have implemented information capturing and storage that is truly profoundly extensive and intensive, deeply intrusive . . . that is, while Canada has extensive regulatory rules limiting access to personal information (even within a single agency), Canada also has captured and keeps vast amounts of detailed individual information.
Which leads back to the observation about the difference between what CAN be accessed and what, in a particular situation or transaction, is typically accessed. Applications for some kinds of visas, for example, will trigger more extensive screening of database information than, say, a PoE examination attendant application to enter the country as a visitor.
(Note: I am disregarding the more extreme paranoia perspectives which apprehend "the government" captures everything, knows everything, and uses it all; noted with the caveat that it is utterly amazing how much more personal information is captured and maintained these days, and not only accessible but actually accessed, compared to when I was much younger, even back when I was middle-aged. Further noting that it appears private and corporate entities may be capturing a lot more personal information than governments, and it appears that trend is accelerating. Smile, your every detail is being electronically culled. And this information will be sold to just about any bidder, not just the highest.)
In Canada much access to personal information in the government's numerous silos of data, including databases in databases, is tiered depending on a kind of need-to-know or triage scheme. For example, not just any IRCC agent or officer can go into their computer and pull up an individual client's CBSA travel history. Some of the structured access is tied to discretionary decision-making, individual officials having the authority to probe a level deeper if they decide there is a reason or cause without requiring authority or permission from another official, and often without this decision being subject to any review (they still need to have a reason, just that no one else is generally monitoring their decision-making). Some access, in contrast, requires overt permission from a supervising official. Some types of access require permission from the individual UNLESS there is an overriding investigatory cause. This is just a highly generalized, rather superficial outline, referring to an intricately complicated matrix of access-controls interfaced with the highly complex matrix of information-capturing methods . . . much of which is behind the curtain behind closed doors, more or less strictly confidential, especially when there is any investigatory purpose implicated.
So here too CONTEXT looms large. Going back to the example of an IRCC official accessing an individual's CBSA travel history. A particular official may have the authority to access clients' CBSA travel history generally, but still not be authorized to access it EXCEPT in certain circumstances. That is, it would be highly unusual for any IRCC official to have authority to randomly or arbitrarily access a client's CBSA travel history. Typically there must be a legitimate reason, and depending on the reason there may be further limitations on if and when access is authorized. Again, some access will require the individual's permission, but if and when there is a particular investigatory cause or need, the individual's permission is not required. CBSA officers, particularly those screening the traveler at a PoE, have broader, less restrictive access to a client's travel history information, but even they do not have unfettered access (allowing that just like law enforcement generally, more than a little unauthorized probing for family or friend likely goes on, unfortunately).
Nonetheless, in the context of your query, all that seems well beyond the overthinking things horizon.