It seems like you keep confusing Trust Funding Source with Income, and Income with Medical payouts. At least, that's how I read this newest comment: "if the trust paid more medical expenses than the $ 10,000"
Starting with your first description, you need to separate the Income/Capital Gains issue and the Medical issue. You linked them, as if the one makes the other by definition.
Go back and read @BobKamman contribution, specifically starting at: "The funds are considered to have come first from trust income (not capital gains) and then from trust principal (which includes the capital gains, after taxes). " And that's why Bob's next paragraph points out the determination for Medical is not part of "is this capital gains, was that income."
It simply means the Trust made some funds available to that beneficiary, indirectly.
Step 1. What types of activities did the Trust have this year? This has nothing to do with what happens with any Funds, or even if nothing happens, or there are no activities at all.
Step 2. Did any beneficiary benefit, directly or indirectly? That gets treated for tax purposes however it gets treated, not for what was done with it, but for what it was (DNI, corpus).
Step 3. The Medical expense your tax payer individual can "take" is whatever was incurred and spent, as it qualifies per the 1040, no matter where they got the funds from.
For example, the trust could include a payout to the beneficiary at some attained age, just reached, and that person had this medical debt hanging over them, so the payment went from the Trust to the Hospital. That could result in the Trust paying medical costs far exceeding DNI for that same year. That's why they don't relate. Heck, it could even be some settlement trust set up specifically for the future medical needs of an injured party, as quite the pool of funds available.
"Level Up" is a gaming function, not a real life function.