Graduate courses as undergrad vs master's degree
Not counting research experience, is it advantageous to 'formalize' one's graduate courses by getting a master's degree, from the viewpoint of career opportunities?


For industry, yes, it is advantageous to get the Master's degree if you're doing basically the same work.  The Master's degree is generally considered a terminal professional degree for many industries, so there's some value in getting that rather than just a Bachelor's degree.

For academia, no, it's typically not advantageous.  Most US-based PhD programs will require you to do core coursework roughly equivalent to a Master's degree regardless of whether or not you already have one.  (I do not know enough about European programs to comment on them.)  They will also typically present you with an opportunity to earn a Master's on the way to your PhD.  Thus, getting one before you start a PhD program at another university is, perhaps, redundant.  The only exception is if you are planning to switch your focus a bit.  For example, you might get a Master's in Public Health and then start a PhD program in Computer Science focusing on applying computer science research to public health problems.

You also mentioned that you were interested in a PhD, but wanted solid letters of recommendation so that you could have a reasonable chance at a top university.  The best way to do this may not be through coursework.  Obviously, coursework is important, but you may find that working with a research group as an undergrad allows you to more closely interact with a faculty member and get a more personal letter of recommendation.  Professors write letters of recommendation for students based on coursework all the time, but it's more rare for them to write one for an undergraduate with whom they have worked on research projects.  Also, this would allow you to determine whether or not you enjoy research and learn a bit more about what you would like from a graduate school.  Research is quite different from coursework.  It's more of a career than a school experience.