Is it transphobic to ask someone if they have a penis
No, but it is irrelevant. A persons genitals have no baring on their gender, and It’s a best practice to get away from the topic of genetalia when speaking to non-gender conforming individuals.
Not really. Sex and Gender are bimodal distributions. Meaning that the vast majority of people are born a sex and grow up to its affiliated gender. While there are elements such as hormones and other traits, the groupings appear in two bell curves with some overlap. The overlap is small, but there are intersex people and asexual gender identities. Overall, most fall into line with a sex/gender alignment.
Even transgendered people show up in a largely bimodal distribution where sex/gender distribution is largely male/woman and female/man.
So its not absolute, but to say biological sex has no impact on gender is false. You can't just erase the impact hormones have on a person, otherwise there would be no hormone therapy for transitioning.