I am not familiar with the setup on the Hogwarts but did replace a similar motor on a starter set 0-8-0 with an RS 385. Like Ted says the major hurdle is having to use the worm that is on the small motor. I removed it OK and then drilled it out for the larger RS385 shaft. I recall the mounting holes were the same size and location but material around the mount had to be cut back. I also had to machine some of the flywheel away to fit. That may or may not be an issue with your engine.
This ended up being one of those "30 minute jobs" that took half a day.
Pete