I think that you are approaching this exactly right. Most rejected applicants seem to be asking "how can I get over my low credentials without doing any work?", as if there was some secret button one could press and make past mistakes go away. You are recognizing where you did wrong during your masters, and have a plan to do better next time. You seem to be correctly guessing that you didn't get great letters, and that's OK, as not every student can be above average (actually, about half are below average, ha ha). But since you will be correcting the issues, you will probably get better letters next time.
Graduate school admissions are not a test of your worth as a person nor an evaluation of the totality of your life's choices. It's just an attempt from the admissions committee (or department, or PI) to answer the simple question: is this student, as they stand now, ready to produce some research? If the answer is yes, you get admitted.
So yes, as long as you do things differently this time, doing another Master's will increase your chances of admission.
Remember that you don't have to be admitted by all the programs you apply to, but only one.