Is anybody really trying to "keep trans kids out of sports"? Or rather, are they trying to ensure fairness by mandating that every child compete in the events appropriate to his or her biological sex? At the risk of being repetitive, bodies play sports, not gender identities.
I agree that "drop your panties" is a horrible idea, if they are really proposing to do this. As you say, this is likely to put anyone who is subjected to it off playing sports, full stop. On the other hand, maybe boys should accept that they ought not to try to compete against girls in the first place? (Caster Semenya spoke about having to undergo the "drop your panties" thing regularly, and how humiliating it was, and whatever one thinks of that particular situation it really is not an acceptable way to treat a teenage girl under any circumstances.)
On the other hand, it should be trivially easy to check anyone's genetic makeup with minimal invasion or embarrassment. A blood sample isn't necessary, a saliva sample or cheek swab will do it. A friend of mine was in the Scottish team for the Commonwealth Games in the 1970s (long jumper) and she told me about how it was done then. Women had a couple of hairs plucked from their heads and the analysis was done on the hair root/follicle. The problem she and a couple of other women in the Scottish team had was that their hair kept breaking off rather than pulling out at the root (Celtic hair is quite fine/brittle) and they were called back several times and people began to talk...
That arrangement (doing the test at the actual athletics meet) seems daft to me. Genetics don't change. Nobody suddenly acquires a Y chromosome in their late teens. Just do the cheek swab thing once when athletes are juniors, and unless there is impersonation, you're good.
The real issue with this concerns girls with DSDs, especially those who may not know they have such a condition. I believe one of the reasons this was stopped in the 1990s was that a woman who tested positive for the SRY gene was very insensitively handled and committed suicide. So it needs careful thought, not a bull-in-a-china-shop approach. Arguably anyone with a DSD condition will benefit from early diagnosis and access to appropriate counselling and mental health services, so this isn't an argument for not doing it at all. But the inevitability of turning up a few such cases has to be factored into the system and appropriate measures put in place to support these girls once the diagnosis has been made.