I remember my dad calling us from the ship where he was working, saying he’ll be a bit late from the leave because the starboard side Sulzer 6ZAL40 threw a counterweight through the side of the block and they’re proceeding with only one main engine. I visited the ship at the dry dock where they had disassembled the engine as far as practicable and then swapped the block through the side of the vessel. Some years later, the port side crankshaft was also changed, but at that time they just suspended the upper part of the engine from the engine room ceiling and made a smaller hole to the hull. The engines were located right below the deckhouse so they couldn’t make a hole to the deck.
Swapping a medium-speed engine or genset is easy, but have you ever heard of anyone removing a large two-stroke crosshead engine from the bowels of the ship? The Chinese did that a few years ago with their polar research ship, changing the Ukrainian engine to a Wärtsilä unit.