"Esto" is the neuter and not gender specific. I think when it sounds like it could be an answer to a question or if the gender of what you are referring to is ambiguous you always use "esto". Also you might be confusing "este"(masculine) with "esto".