It's missing the point Scottish to talk about Michael Phelps and Usain Bolt.
Women's athletics is a specific artificial category to divide men from women because on average men are considerably faster and stronger then women.
Similarly, sports like boxing and judo are divided into artificial weight categories so that smaller/lighter athletes can still have the experience of competing and winning.
Swimming doesn't happen to have any further categorisation systems mostly because it's not a contact sport ,although it could do if people felt it was important enough. The point is it doesn't at present so Michael Phelps isn't breaching a category by having large feet or whatever.
The trans and intersex problem in sport is the breaching of a pre-existing, agreed artificial division among male and female competitors which was created precisely because of biological differences. It renders the category pointless, like allowing a heavyweight boxer into a bantamweight category because they say they feel very light.
I agree with the pp who said it's not just about testosterone either. It's about bodies that have been through male puberty and will therefore retain all the other general advantages of male puberty such as musculature, height, skeletal frame, pelvic angle, proportion of fast twitch fires and so on, even if you then reduce testosterone levels afterwards.
Genuine intersex athletes could have their own medal category, surely that would be a fair solution. That 800m race podium was a bad moment for women's sport. Transgender male to female athletes, sorry no, compete with your biological sex unless you took puberty blockers.