Thank you for your question.
Let's first start with thinking about what exactly you are protecting yourself from. If a senior manager is making sexist statements about hiring based on gender, then the company itself is looking at exposure to liability for violation of the federal and state employment anti-discrimination
laws. There is no individual liability exposure here. The company (i.e., the employer) is the only party exposed.
So, in truth, your exposure lies with being dragged into a claim because you were ordered to act in a discriminatory way. As in many things in business, the boss will try to place the blame on a scapegoat, usually in a person under him/her. This means that the real exposure to you is being blamed for executing a discriminatory act and then being fired or otherwise disciplined, which would put a blackmark on your resume.
So, does the company have an HR department?
Does the company have any established policies regarding discrimination?
Does the senior manager have a boss whom you could complain to?
Other than recording the conversations, have you made any written objections?