I can say in my airline there a several layers to ensure the correct people are on the flight deck. Having said this, I suppose anything is possible.
It's hard to get into people's minds. No matter how wholesome, intelligent, kind, a loving parent, loyal, dedicated and competent worker can be: For whatever reasons, one day the employee can snap and come off the rails.
There was a time when big jets had Flight Engineers and when two (2) crew members would ALWAYS be in the cockpit when another visited the Lav or galley. Maybe it's time to have a 3RD pilot in the cockpit, not just for safety, but for sanity.