Such a move is possible. But it takes a measure of political courage no longer present in western Europe. From Wikipedia:
The (German) president can dismiss the Chancellor, but only in the event that the Bundestag passes a Constructive Vote of No Confidence. If this occurs, the president must dismiss the chancellor and appoint the successor requested by the Bundestag.
“undestag passes a Constructive Vote of No Confidence. “
I can see a scenario where this could happen.