I guess I'm experienced enough to have a few advices to give.
The great majority of my lenses were bought second-hand, some long ago, most of them quite recently.
While most of my best Pentax lenses were purchased in the late seventies and in the eighties, a huge number of not-so-expensive PK and M42 objectives were acquired in the last five years.
About six years ago I went fully digital, stopped shooting with large format film cameras, and also stopped collecting large format vintage lenses.
The number of PK, M42 and adapted lenses, Pentax and third party, that I have bought over time is not small. Some are mainly collector's items, so I guess I have an excuse

I don't know the exact number, for sure is more than 350. Kind of manic, I know, but on the positive side I can say I have accumulated some experience
On this huge number of purchases I had far more nice surprises than bad surprises. I guess I could have returned a handful of them, let's say about 1 on 50, but I kept all of them, to be repaired or as a source for spares.
Most of the "problematic" ones were cheap, so paying for the shipment would have made little sense.
On top of that, I think that I'm taking risks with my buying habit, so I accept the occasional bummer the same way I welcome the (far more common) great finds.
Sometimes I buy lenses knowing in advance that there is fungus and haze.
Now I have two beautiful SMC Pentax lenses (3.5/24mm and 3.5/28mm) that were bought for very cheap from Japanese vendors that correctly described the lenses as hazy and with fungus. I cleaned them myself, but sometimes the price can be so convenient that the saving largely outweights the cost of a professional cleaning (around 70 bucks).
Diaphragm problems and stuck focusing rings can be far more costly to repair, or they might even be unrepairable (spare parts might be impossible to find).
According to my personal experience, modern plastic zooms are far more prone to fungus, and easier to get out of whack because of minor knocks, than all metal vintage objectives. Stored in the same place, two highly expensive AF zooms were covered by mold, while a number of metal vintage objectives were still perfectly fine.
Regarding prices, better buy cheap lenses from auctions. The more expensive ones can sometimes be found cheaper from Buy It Now sales.
Always consider shipping charges and taxes. On low/medium cost items it makes a huge difference. A more expensive item sold closer to home can actually be cheaper after you do the math!
Thoroughly check modern AF zooms for decentering, especially the fast ones with hefty glasses. Check in general for problems due to bent zoom/focusing sleeves.
Even expensive, high performance optics have a very fragile build. An "accident" that left no visible trace could have substantially damaged the lens.
If I didn't already love vintage primes, this would be a a good reason to consider them. Some old optics are as good today as they were 30, 40, 50, even 60 (!) years ago.
One last recommendation :
be PATIENT.
I have in my wanted list a few lenses that routinely pop out in my searches, sold for ridicolous high prices.
I'm sorry, I won't pay a Voigtlander in PKA mount double the price of a Nikon Ais mount! No one gets sold, the vendors wait for the impatient buyer who wants that lens at any cost. Please try your best to avoid being that silly buyer they're waiting for.
I understand that an old Meyer Trioplan (or Primoplan) have something special (I own both, and for a good reason), but there is a limit. Some prices I see are simply Martian, not of this planet! Some vintage optics became very fashionable in the last years, but some prices are simply unacceptable. Please be patient, soon you'll find the same lens, in the same state of conservation, for half the price. Do your homework, check recent finalised sales.
A little common sense and some restraint would help to save some money, and at the same time would help to correct some distorsions of the market.
The ideal situation is when you have the chance to try, or at least see, the lens before buying. Unfortunately brick and mortar stores are disappearing, and most of the times prices are not competitive with what you can find on the Internet.
Checking in person is the ideal situation, though pictures can be very self-explanatory, and when details are not shown I suggest to ask for more pics.
At times I made last minute purchases, or just followed my gut feeling (and my educated guess). Taking some risk paid off most of the times. I even paid with bank money transfer, especially for goods from Germany, with no right to get refunds or to return the lenses... In the end I have almost no regrets. It seems that most people are actually decent fellows.
If I could change something, I'd be more patient with some of my early, over enthusiastic purchases. I would avoid a couple of errors and save some money, that's all.
In hindsight, if I had been over cautious I would have lost my best deals.
Vendors are generally honest, and the eBay feedback system allows to weed out the bad ones.
I would pay a little premium to buy from a dedicated pentaxian on the marketplace of this forum. Unfortunately the few great deals disappear almost instantly
The remaining offers are generally overpriced. I repeat, a little premium for a lens that has been CLA'ed or checked and tested by an experienced forum user, is perfectly acceptable. In particular if the buyer lacks experience. Though I often see inflated prices, well over the average market offers. I see the forum as a community, not as a place where to make some quick money.
I had a big favor from a forum member, and on my side I gave away two lenses for free. I would never sell a defective lens here, not even one of so-and-so performance. Maybe I'm naive...