Double taxation agreements are not a way to cut your tax rate. They are usually structured in a way that makes sure you pay the higher of the two tax rates.
Also, companies cannot directly and permanently employ people living and working in other countries without having a legal establishment there acting as the employer. Without a local legal entity to employ you, you'd have to register as self employed and then it doesn't matter for personal income tax where your customers are (It may matter for VAT though).
Some countries offer various temporary exceptions for expats, but the general rule is that you pay personal income tax and social security contributions in your country of residence.