The UK has automated access to the following immigration databases:
Immigration databases of the Migration 5 immigration countries beginning in 2021. The UK will be able to query anonymous fingerprints to the other four Migration 5 countries. If there is a match with any of them, a response will be automatically returned with limited information including any previous immigration violations, deportations, removals, refusals etc.
Immigration databases of Ireland. The extent of the access is not publicly known but you should assume they share data based on biometric and biographic matches.
The UK has NO direct access to the immigration information, including removals and deportations, in the SIS I/II. Only the countries who are signatories to the Schengen agreement have this access. Similarly, the UK has no access to the immigration information in the VIS. Data protection laws in the EU are very stringent. The UK, USA, Canada normally store visa/immigration related information for decades. The VIS only stores information for 5 years. Similarly, SIS alerts need to be regularly reviewed.
The UK does have provisions through bilateral and multilateral agreements, including with the Migration 5 and EU countries, to share immigration data on a case-by-case basis. This means that the UK should have a reason to suspect that the partner country has derogatory information about an individual before a search request can be sent. This is a slow process requiring approvals and manual searching and is rarely(if ever) done.
The data obtained by the Migration 5 countries may be shared with other agencies and governments provided data protection rules are followed. In reality, the chances of this happening are extremely low. Whereas the UK would automatically know about a visa refusal from the USA by fingerprint matching, they wouldn't know information shared by another country with the USA unless a follow-up request was made by the UK to the USA for it. In other words, with millions of applications made each year, the chances of manual checking are close to zero.
You can make Freedom of Information requests to the Home Office using www.whatdotheyknow.com and ask them the questions you have asked us. The Home Office will be legally bound to respond. My opinion is that most of the information that you seek will be provided (some is already available). Please do share the response with us here too. FOI requests in the UK can be made by anyone (you don't have to be a citizen or resident) and are free of cost.
The best places for information about data protection, sharing and retention are the government departments themselves who process our data. Thanks to data protection laws, most government agencies in the developed world are bound by law to share this information under most circumstances. The work of intelligence agencies, who are exempt from data protection and public oversight, is different. However, routine immigration casework is not the function of intelligence agencies.