Risk stratification of sudden cardiac death after myocardial infarction and prevention by defibrillator rely on left ventricular ejection fraction (LVEF). Improved risk stratification across the whole LVEF range is required for decision-making on defibrillator implantation. The analysis pooled 20 data sets with 140 204 post-myocardial infarction patients containing information on demographics, medical history, clinical characteristics, biomarkers, electrocardiography, echocardiography, and cardiac magnetic resonance imaging. Separate analyses were performed in patients (i) carrying a primary prevention cardioverter-defibrillator with LVEF ≤ 35% [implantable cardioverter-defibrillator (ICD) patients], (ii) without cardioverter-defibrillator with LVEF ≤ 35% (non-ICD patients ≤ 35%), and (iii) without cardioverter-defibrillator with LVEF > 35% (non-ICD patients >35%). Primary outcome was sudden cardiac death or, in defibrillator carriers, appropriate defibrillator therapy. Using a competing risk framework and systematic internal-external cross-validation, a model using LVEF only, a multivariable flexible parametric survival model, and a multivariable random forest survival model were developed and externally validated. Predictive performance was assessed by random effect meta-analysis. There were 1326 primary outcomes in 7543 ICD patients, 1193 in 25 058 non-ICD patients ≤35%, and 1567 in 107 603 non-ICD patients >35% during mean follow-up of 30.0, 46.5, and 57.6 months, respectively. In these three subgroups, LVEF poorly predicted sudden cardiac death (c-statistics between 0.50 and 0.56). Considering additional parameters did not improve calibration and discrimination, and model generalizability was poor. More accurate risk stratification for sudden cardiac death and identification of low-risk individuals with severely reduced LVEF or of high-risk individuals with preserved LVEF was not feasible, neither using LVEF nor using other predictors.