This is really interesting. (Sorry if there’s already a thread about this; did look and couldn’t find.)
www.lgbtqnation.com/2023/01/ecuadoran-man-changes-legal-sex-bid-gain-custody-kids/
Looks like the change was quite simple, he went to the registry office. This is one of the big issues with self ID, and it’s not even about trans people, it’s just about people abusing the system. Although the evidence in this situation would suggest this guy has honourable intentions and not nefarious ones; doesn’t mean that’ll be the same for the next guy who does it.
(Shame it sounds like Ecuador has such sexist laws about custody battles but I don’t know enough about that to add any real comment.)