Would there be a yichud issue in the cockpit?
Absolutely. Shiur yichud is considered to be between 2 to 5 minutes among the poskim - and less if the two are fond / comfortable with each other. Yichud is discussed among the poskim in elevators, and can also be a problem in the subway/tube - when you have trains where the doors between the wagons are locked, and the stops are distant.
In the post-9/11 era, only pilots have access to the cockpit. On El Al planes, there's even a toilet within the secure cockpit area. El Al may also be equipped with cockpit video recorders, although I doubt poskim would hold that that would solve the issue of yichud, unless it's closed circuit. In the U.S., the NTSB has been pushing for cockpit video recorders to become standard since 2003, but this effort has been consistently opposed by the airline industry and the FAA. Additionally, Part 121 regulations prohibit the use of devices like GoPros in the cockpit, which is why cockpit videos on YouTube typically come from foreign airlines not under FAA jurisdiction. However, all airplanes are equipped with a Cockpit Voice Recorder (CVR) that records a minimum of two hours of audio before looping. U.S. law strictly limits access to CVR audio recordings, restricting it to authorized investigators only.