How a seafront stabber incriminated himself after plotting what he thought would be the ‘perfect murder’, says senior crown prosecutor.