A combination of missed prevention opportunities and health inequalities can result in the early deaths of people living with epilepsy and intellectual disabilities, a study has shown.