The tree is suffering from a form of rot known as gummosis or Phytophthora, which is a genus of fungal diseases. It has clearly entered the tree at the graft point.
I have seen specimen trees recover from symptoms like this, but it needs intensive care otherwise it is a slow death.
Sylvain is right. First you must cut out dying branches and then get rid of the scale infestation. White spraying oil is the same as horticultural oil and gives good control after a while. Otherwise use a general systemic insecticide. Ask local advice for citrus use - I think you are in Malta - or use something containing imidacloprid. But then to be absolutely safe you may have to throw away the lemons for one year. Follow the label instructions.
Sylvain's fosetyl-Al (Aliette) and propamocarb are fungicides which give good control of phytophthora. They are available in France, but may not be in Malta. Again, try and speak to a commercial local citrus grower. And fertilise generously as recommended for a strong spring growth flush.
If you follow this route the wood should gradually regrow towards the dead bark areas, rather than the dead areas spreading. As this happens the dead bark and wood near that graft can be scraped away.
A new tree may be easier.
But, personally, I always try to repair before replacing. Much more satisfying!