COULD you do that? Sure. The relevant question, though, is if the tradeoffs involved would be worth it.
How could you do that? Essentially, a trusted 3rd party could have the ability to disable all controls that the demented pilot has access to and assume all control over the aircraft. If you're willing for somebody in the network operations center to have the ability to "turn off" every switch & control in the cockpit and remotely pilot the airliner to its landing, then you're set. The pilot is now every bit as much a passenger in the aircraft as everyone sitting behind him is, and short of taking the crash ax and causing a depressurization, he can't affect things that much. (And even if he did that, the airplane still won't crash.)
The problem with that plan is obviously that if the remote control function gets taken over by hackers or a demented individual at the operations center, the pilots are helpless to intervene. After all, for the demented PILOT to be rendered harmless, you have to remove ALL ability to override the remote control, all ability to pull circuit breakers, all ability to affect everything.
So, where is the greatest threat? A demented pilot that overcomes the other pilot (by force, by locking him out of the cockpit, whatever), or problems at the operations center or in the remote control process? The track record of airline pilots is unmatched by nearly anything else for reliability and resilience, and we aren't nearly as vulnerable to being hacked as any remote control datalink would be!
The general understanding is that the best solution is to keep the pilots in control of the aircraft, and have measures in place so that if one of them loses it, the other pilot can keep things going. Things like having a flight attendant in the cockpit to let the other pilot back in (would have changed the course of the Germanwings flight) can go a long way. Or if there is a struggle for control, a pilot could summon the flight attendants over the PA to get help restraining the madman.
Perfect solutions? No. But better than allowing the aircraft to be taken over by somebody outside!
After all, while "pilot goes nuts" is a vivid headline, the extent of the actual risk is quite limited. Millions & millions of commercial flights happen without incident every year, and introducing a slew of new risks in the form of remote control that can't be over-ridden, seems like a severe over-reaction to what is in fact an incredibly remote scenario. There are better ways to deal with the extremely rare & unlikely "crazy pilot" possibility than that.