I have, not-so-recently, been in the situation to work remote as a programmer for a company in Germany while being a resident of UK. Because of some reasons, I had an employment contract with the said company. Worth mentioning that the company didn’t have UK tax presence.
Being an employee meant that I was taxed “at source”, that is, in Germany. But being a resident of UK, I had to pay the taxes in UK. That’s what pretty much what the dual tax agreement say. And the tax advisors, in each respective countries.
As I had to obtain a full tax refund from German Tax Office (Finanzamt) all while submitting tax returns to HMRC, this turned into a shit sandwich without bread. Finanzamt requirea tons of documents to prove residency in UK and lack of residency in Germany, two tax advisors – one in each country, and, yeah…the works.
So, if you’ll ever be in this situation, don’t choose employment. You’ll just end up doing more work and being more stressed out than you should 😀