As someone else here said, Apple would 100% call this bluff. And you can be certain the UK won't have the US to put pressure on Apple for them. All the would happen is the UK Apple users would be with an expensive paperweight.
That assumes that Apple's shareholders believe that Apple's privacy reputation (relative to other companies) is more valuable than access to the UK market.
All evidence that I have seen suggests that consumers by and large do not care about this kind of privacy. They do not buy iPhones instead of other phones due to the privacy properties.
Therefore Apple's shareholders could order Apple to stay in the UK market.
And if not, then Apple's customers could be compensated with money and other UK-held assets that the government could confiscate.
This is usually true of any corp. However, Apple is the one big tech company that has built its reputation on privacy more than any other, and Cook in particular is very strong on that -- and he's not prone to Zuck-like flip/flopping, at least not so far.
You may be right, of course. But if there's one tech company who _might_ say "no", it's Apple.
According to NASDAQ [1] the two main investors are Vanguard and Blackrock, but the two of them together are far away from 50%. There are a number of other large investors. I didn't do the sums but there must be probably 30 of them to get to 50%. Do some of them care about privacy of common people? Probably not. About the people in their boards? Probably yes.
Most users don't care about that stuff, but I think a small but significant percentage do. I have never been an Apple fan but I am aware that they are significantly better than Windows and Andorid for security and privacy.
As someone else here said, Apple would 100% call this bluff. And you can be certain the UK won't have the US to put pressure on Apple for them. All the would happen is the UK Apple users would be with an expensive paperweight.