When selecting an opening lead, there are two decisions that you must make. First, which suit should you lead? Second, which card should you lead from that suit?
Most of the "rules" about leading address the second question. "Fourth highest from your longest and strongest" addresses both. It's an easy rule to remember, and it's usually not a terrible choice, so it is taught to beginners as something to do while they gain enough experience to learn when other choices are better.
In the particular cases you've linked to, leading from the longest and strongest suit is likely the best choice, but the standard lead is not fourth highest. Why is that? Experience has shown that, when leading against no trump from a suit with a (possibly broken) honor sequence, you are most likely to get your full share of tricks by leading one of those honors. Let's look at your examples.
KQJT9 xxx Kx xxx, you are on lead against 3NT. You have an excellent 5-card suit and at least half (and likely more) of your side's high-card strength (opponents likely have 24-30 high card points combined based on the 1NT-3NT auction). Leading a spade means that you will defeat the contract if any of the following is true:
- Partner has a stopper in a suit they need to play on and enough spades to play one back at that time.
- Declarer has the diamond ace and needs to play on diamonds to get to nine tricks (the finesse into your hand will give you the DK and now you can enjoy the rest of your spades).
- Partner started with the spade ace and at least one more spade.
Two of these depend on partner knowing what to do in whichever situation you find yourselves in. If they have Ax in spades, they have to know to go up with the A at trick one and continue another. If they win a trick in another suit, they have to know that continuing spades is correct. The way they know this is that you've played the SK, which shows a suit with a lot of honors. Leading the ten does not give this signal - you would have to lead the ten from Tx, T9x, QT9xx, etc (we'll see why next in the last case, but just trust me on the others) - so partner may decided that the best prospects for the defense are in another suit.
In the other example, you hold
T87 KJT92 J Q852 and are on lead against 1NT. Even though your partner has the bulk of your partnership's high cards (opponents are limited to at most 24 points by their auction), you are most likely to defeat the contract if you can score some heart tricks. One way to make sure that partner knows this is to lead a heart. But which one? Well, let's think about some honor layouts. Let's ignore signaling for a moment, and just consider how many tricks you can take in double-dummy play. If partner has the HQ, it doesn't matter too much which heart you lead - partner will play the Q and you will eventually force out the ace. If partner has no heart honor, it also doesn't matter which heart you lead - if declarer haS the Q you've already blown a trick, and if dummy has the Q it was always scoring. The situation where it does matter is when partner has the A but not the Q. Here, if you lead one of your middle cards (J, T, or 9), and dummy has the Q, you are running a finesse. Partner will duck if a small card is called from dummy so that you can repeat the finesse, or win the A if the Q is called. If declarer has the Q instead, partner wins the A and returns a heart so that you can finesse against the Q. In this way you are likely to take five heart tricks off the top, sending you well on your way to defeating the contract. Suppose you had started with KJT32 - now leading the 3 is ineffective when dummy holds the Q and partner the A because partner will have to play the A regardless of dummy's play.