Can a managing editor replace the editor on a paper or remove them from the editorial board?
Yes, a managing editor (which I'm using as a term synonymous to "editor-in-chief" etc - basically members of the editorial board with more responsibility) can replace the editor assigned to a paper or remove them from the editorial board.

Perhaps the more pertinent question is: if the managing editor doesn't do it, who will?


The editor is not going to remove himself/herself from the editorial board - after all they're already inactive.
The publisher is not likely to do anything without approval from the editorial board. In special circumstances they can, but doing so is a nuclear option that will leave a lot of bad feelings among the remaining editors and is therefore usually avoided.
Obviously the authors and the peer reviewers can't do anything about it.


Therefore the managing editor must do it. Nobody else will.