Suggesting ideas to political parties is also not illegal.
It is only illegal if the money is donated for the sole purpose of influencing a particular decision.
You're free to try this if you want I guess but please know that courts are well aware of this strategy and will immediately see through you. Unless your argument is that things aren't illegal unless you're caught which is also rather dicey, but again go right ahead, ymmv.
* A friend asks me to borrow $400K. He is a good friend, and I am happy to help him out
* A few months later, he decides to donate $200K to a political party that happens to be in power at the time
* The government makes certain decisions that appear to be in my favour. I discussed that certain changes would be helpful but never asked for them directly.
Basically, it is a gentleman's agreement where no party involved explicitly asked for anything. Illegal in the spirit of the law, yes,provable in court beyond a reasonable doubt, no.As another poster highlighted, you don't even need to use a friend in the UK, you can donate directly. The price of a seat in the House of Lords is £400,000 ($500K), but you can get other political favours much cheaper.
The price to buy a seat from Boris was nearly an order of magnitude cheaper - but he also sold a lot of seats that he can not fulfill.
Having seen this in action (UK, Tory government) ... you are taking too many steps and too much complication. You donate publicly, on the register, to the party, candidates, (leadership candidates) etc. They give you things you ask for. The entire "scheme" is far more transparent than you think. It is also much cheaper than you think.
The expensive path is to literally hire a sitting member of parliament to your company and then you also get things you ask for.
The system works(/worked) extremely well because the people involved had some class and would only ask and take within reason.
That's not legal then. There's just a lack of evidence to bring a successful prosecution.
Of course, the friend in question will then get endorsed for a lucrative position, a cushy consultancy job or a non-executive board membership.