Hey,
You may be right with the car insurance but give it a try if you cannot be sure that this is excluded from the paperwork you have with your current policy.
Most of the insurance companies pay you for something that happens to the car by an external force, e.g. another car, thunder, rain, tree, but you are also covered if you reverse on a wall. It is all your fault and it is down to the policy whether this is covered. So in the same analogy, the insurance may take this further and like reversing on a wall, they made decide that driving your car, something went wrong with the engine and this is a major repair bill. So they have include this in their terms and they will be happy to pay you some money, take the car off you, write it off and sell it to salvage companies.
A brand new 6 starts from £20K on Auto Trader and 2016 models start from £8.6K. They ask you to pay £5.5K and so if you had a car accident, for sure the car insurance would write it off for a bill like this. I think you can get more than £3K for your current car and together with the repair estimate, you can buy the same car again. But you have to negotiate with the car insurance. As there is no accident to make a claim, I think it is safe to discuss with them for advice. If they reject that there is a chance for a claim, then you can consider all other options.
I understand what you mean about the second hand engine and it is quite complicated to make it work out without feeling that the car is not stock, but in general a second hand engine, cannot be any worse than buying a second hand car. You have also to consider who will do all this major work.
A legal action may be possible but do not invest huge sums and then end up with no car. It will feel like a defeat not to chase Mazda, but if the money you are going to spend, do not guarantee that you will be back on your car, then maybe spending this money to get another car, may be better. A solicitor will be very cautious taking such case if there is limited chance of winning and this is a good sign. Maybe you could ask at the local trade standards and the citizens advice.
If you could get away with someone like the insurance company paying you the trade in money, this may be the best way forward as you get rid of a car which will have a major repair and who knows what comes next. But I am not sure how much the trade in value could be when these models sell from around £8K. A small brand new car starts from just over £6K but you may not even get that much if you manage to get the insurance writing off.
I am not sure whether people read online reviews. Most of the people are interested in the monthly repayment. As long as they can afford this to get a new car under warranty and every time the warranty expires to replace it, they are happy. If your damage happened within the warranty period, for sure Mazda had to fix it for free, but now it is tricky because so many things can have gone wrong, from the oil specification to everything else. If you had bought the car used, there was a case to consider such write off damage to be bad luck, but for a car bought brand new, even as pre-reg car, it is a disaster, especially as it sounds like you were planning to keep it under it was scrapped.