Thanks guys - your analysis was perfect. It was caused by an issue with the smart plug I had it connected to so that I could measure power consumption. Looking through the data there was a brief dip at the exact time the abnormal shutdowns happened. Since removal I have had no issues.