A few years ago, I graduated with both a master's and bachelor's degree from a globally ranked top-10 university. My overall classification was an average upper-second class (UK) - which is around a 3.4-3.5 GPA for the US-based. For context, an upper-second lies in the range of 60-69 whereas a lower-second lies in the range 50-59.
I applied broadly to PhD programs a few years ago but was rejected by all. My master's thesis advisor and postdoc that I worked with both agreed to write me letters of recommendation but perhaps they were not strong enough - hence, my rejection.
I have spent the past few years as a software engineer in industry detached from academic research, yet after much reflection, I am sure that I would prefer a career of research over my existing trajectory as an SWE.
Despite this, I do not have the "raw material" to put together a competitive PhD application (as outlined by the evidence above), and so am wondering how to get into a good PhD program.
I am considering doing a second master's thesis with the aim of doing more research with new professors, and then using that as a springboard into a PhD program. The aim is to get better recommendations, a better SoP, and maybe a publication. Is this a sensible idea? Will it ultimately make little difference to admissions committees? Or is there a better way to strengthen my application?