Read Inside STaM by Rabbi Reuvain Mendlowitz and Rabbi Askotzky's book, Tefillin and Mezuzos then consult a rav with expertise in STaM.
The expertise, piety and quality of the handwriting varies widely among sofrim, even those who're certified. Work with an expert to find a sofer that meets your desired standard and budget.
One can't assume that just because a sofer is a family friend or relative or that he's righteous or learns Torah all day that he's the right sofer for you.
Even once the right sofer is found, it's by no means a given that he can be relied on to oversee or recommend examiners or a batim expert.
Many sellers of STaM are negligent and only do one manual exam. In addition, the examiner is generally paid a low and flat amount per mezuzah, parshios and sefer Torah and is often under a time constraint. He's also often not informed by the sofer or seller hiring him as to the level of kashrus he expects. This often results in the examiner only checking to ensure minimal kashrus and overlooking problems once too often. Also, how can one expect quality and thorough service if the examiner is paid the same whether a mezuzah takes 6 or 12 minutes or whether parshios take 30 or 60 minutes to check?
One must select, if need be with professional assistance, certified and capable examiners and appropriately compensate them to ensure that their STaM is patiently and thoroughly checked and that it meets the desired and intended standard.
It's also critical that the sofer, examiner and seller have a relationship with an expert STaM authority so all questions are properly answered.
There are many batim makers. Some produce in volume, often referred to as "factory" made, some in small volume (boutique maker) and "private" makers make in very small numbers.
The quality, halachic level and cost vary, even significantly, from maker to maker.
Some batim are made without any independent supervision and the standards and thoroughness of the supervision on batim with a hechsher varies.
Similarly, the halachic standards and thoroughness of the hechsherim on retzuos also vary.
There's also the consideration of hand vs. machine made and black through and through vs. traditional.
Hence, one should consult an expert to identify batim and retzuos that meet your desired standard and budget.