I've also seen horrible engineers whose code made entire teams miserable become amazing managers tho
IMO, whether one of these individuals can be used is the distinction of whether a role is line supervisor or management. Line supervisors need the subject knowledge to teach fresh hires and know how to identify and fix problems caused by slackers. Management would rely on the senior employees for mentorship and keep their ear to the rumor mill to identify suspect underperformers.