I bought a pair of tefillin over 15 years ago when I first became observant from a seforim store in New York for about $300. A few months later at college, I had the tefillin checked by a visiting sofer through the Chabad House. I didn’t have direct contact with the sofer but the parshios needed some repair. (Years later I had the tefillin checked and was told the parshios were on the border between kosher and kosher bidieved). I was wondering since there needed to be the repair on the tefillin soon after I bought them, if that might mean there was some undetectable thing to make the parshios pasul or that maybe it needed repair because it had been in the store a while and was unused.
The fact that the tefillin needed repair is not necessarily an indication that there is some other hidden psul in the tefillin. The question we need to clarify is if the store that sold the tefillin was a reliable trustworthy person. If he has a good repuatation and you can verify who wrote the parshiyos the tefillin could be assumed to be kosher. Otherwise you should consider replacing the tefillin and doing a lot of research before choosing a merchant/sofer.