I came out as non-binary transgender publicly on FB to all friends and family at 40. For me, 40 was the line in a sand that I told myself I don't cross it hiding. Quiet a few people already knew but still a minority. By that point, I was medically transitioning for almost 2 years.
Yes, 40 is a great age to transition. With good health, you may still have as many years left to live as yourself !!!