Yichud
Chazal instituted many provisions to help us protect ourselves from the tentacles of the Yetzer Hara. Already in the times of Dovid Hamelech, there was a decree forbidding a married woman being secluded with a man lest it lead to inappropriate behavior. At a later time, this decree was extended to prohibit all men and women from being secluded together. (The decree does not apply to parents and grandparents; see Shulchan Aruch (E.H. 22;1) for a detailed list of problems including brother-sister.) The Gemara rules that because the concern is that their seclusion will lead to relationships, the prohibition does not apply to girls below the age of three, or boys below the age of nine (who, according to Halacha, are incapable of having intercourse). A question arises whether elderly men who are impotent are subject to the laws of Yichud. A typical question would be whether they need to find a male caregiver to stay with them when no one else will be around.
Ultimately, it is a source of machlokes amongst the Poskim. The Tzitz Eliezer ruled based on a Rambam that it is allowed as the only prohibition is to prevent improper relations. Because in this case that is not a concern, he rules that is permitted. However, R’ Moshe Feinstein comments on a story brought in the Gemara, where an impotent man was able to engage in a sexual relationship under certain circumstances. Accordingly, he rules that unless a man is a true Saris (eunuch), Yichud with an elderly male is prohibited.
Finally, there is a simple way to avoid this question altogether. Most Poskim rule that security cameras (especially CCTV) create the Halachic condition of Pesach Pasuach LRishus Harabim where there is a fear that they can be seen and as such, it is not considered being secluded and this will avoid the question of Yichud altogether.
Adapted from medicalhalacha.org