What about people with both testes and ovaries? If those were working flawlessly, they would produce eggs and sperm. Your definition labels them female. If you're happy with that, good for you, but it seems misleading to simply label such a person "female" based on egg production.
If you'd like to exclude such people from your definition, and restrict it to people who are (for want of a better term) "stereotypical" male or female, that seems like a circular definition.
My definition in wrong in the same sense that Newtonian physics are wrong. How many people have lived with working ovaries and testes? These extreme conditions do not create a different sex. My definition is good enough.
It certainly is good enough for you, if you say it is. It's not good enough for me (and not good enough for people who don't neatly fall into it; luckily for them your simple personal definition isn't the legal definition in many societies), but fortunately I (and you, I assume) are happy existing in a world in which other people have different ideas (many of course are not, and would happily burn people who don't fit neatly into this definition).
Given the problems we see in society, this definition is clearly not good enough for everyone and not good enough to satisfactorily deal with the problems arising; I might wonder what use a definition is if it doesn't actually guide us in solving problems. Perhaps this definition must be compromised when encountering reality in these situations.
If you'd like to exclude such people from your definition, and restrict it to people who are (for want of a better term) "stereotypical" male or female, that seems like a circular definition.