The basic rules are pretty much the same for most countries because it’s stuff that comes from the OECD and also in the government’s self-interest. So while I don’t doubt there are still viable solutions in the UK, it’s definitely not as easy as “register a company abroad and only pay tax on any money you pay out from the company.”
Just google “permanent establishment UK” and you will find enough reading material to confirm that any such business, while not illegal to register, would have to pay UK taxes due to its place of effective management. And trying to hide the existence of the︀ company from the tax authorities would be considered tax evasion.
So while I can’t give︁ you any concrete advice for what would work in the UK (sorry), I can at︂ least tell you what won’t work.
Simply read any UK tax treaty, you will always︃ see that the UK can tax the company, regardless of where it is registered. And︄ if there is no tax treaty, the UK rules apply anyway.
Solutions that work around︅ that, i.e. where the effective place of management is abroad, are expensive because you’d need︆ to show an office, a local director etc. to prove that you are not actively︇ involved in the daily operations of the business/manage it from your home country. That’s called︈ economic substance and obviously quite expensive. Traditional tax havens are being bullied to check for︉ that themselves, but that’s a different story.
There may be ways around that by distancing︊ yourself from the business through trusts, foundations or other means (some of which would probably︋ illegal). That may or may not work, you should probably pay for proper legal advice.︌ Or get some advice from one of the “consultants” on this forum first and then︍ double check with a lawyer. Note that many “consultants” are self-taught.
There are of course︎ also more complex schemes, which are usually applied by multi-national corporations, but they are even️ more complex (=expensive) and thus probably not relevant.