Artificial intelligence (AI) has significantly optimized processes across various sectors, enhancing efficiency and transforming digital interactions. However, as AI becomes more integrated into daily life, concerns about its social impacts and inherent biases have emerged. This study explores how AI technologies, such as facial recognition and Automatic Gender Recognition (AGR), can perpetuate and amplify societal prejudices, especially against transgender and non-binary individuals. The 2018 case of Amazon's Rekognition technology, which exhibited high false positive rates for individuals with dark skin, highlights the risks of algorithmic bias and mass surveillance. Given these challenges, this research performed performed a systematic mapping study of the literature on AI to present an analysis of problems and respective causes brought by facial recognition and AGR applications to trans and non-binary people. In a second phase, we developed and empirically assessed a catalog of 19 best practices for an ethical AI development grounded in Justice, Equity, Diversity, and Inclusion principles. We aim to establish ethical standards that promote inclusivity to trans and non-binary people, mitigating algorithmic discrimination.