Ship will go into dry dock and the yard will cut out whatever is needed to remove and install a new block. I worked in ship repair for 20 plus years, granted on much smaller vessels, we gained access to the DC motors by cutting the main deck right above the motor room. We also on occasion removed ship service generators the same way. I never saw the deck above one of the four V 16 engines cut open on any of our ships to remove them. The machinists would remove power packs using a overhead trolley. They would replace main bearings through the crankcase side covers. All the welding and fit up is inspected by American Bureau of Shipping. All the welders have to pass ABS tests.
When I first started there I was told all repairs were done in house at one time. They had a armature winding shop and the last armature winder had just retired and he was not replaced. All the valves that leaked were rebuilt, babitt bearings were repoured and machined. I found moulds in a storage building and I was told many decades ago they even made parts from those moulds
No matter how much a [censored] a guy was, how much a lazy worker he was the work done was done to a high quality. Nobody wanted anything they did to fail. The last thing anyone wanted to happen was have a ship lose power while underway. Or have anything happen to put the thousands of passengers in peril
I think to some degree that's all changed