I don't think it will work. 3 reasons. The first is the worm gear pitch between the smaller original motor and the larger motor shown from a Berk. Jr. locomotive is close, but not the same. Probably end up with chewed up gears, that is if you can get past problem 2 and 3. 2nd., the frame on the 0-8-0 is plastic and not die-cast metal. The motor mount is cast into the plastic frame. Major Dremeling and is non reversible. 3rd, motor is taller than original and flywheel probably will not clear boiler shell.
I think if it was possible to fit the larger motor in the 0-8-0 Lionel probably would have done this already.
Chuck, Its doable. I did this on my 0-8-0. I can post a pic later. The hard part is not opening up the motor mount on the engine, its having to the replace the gear. If Dave can find a motor with the correct gear already on it a little Dremel work will suffice. I think the spacing on the motor mount screws is the same.
Dave, hopefully you won't have to swap gears. You can get it off with a puller, its putting that gear on the bigger motor that is tough to do without bending the shaft. You could make the hole a sliding fit and then use super glue as long as the glue doesn't get in the bearing. Seems easy but lots of ways it can go wrong.
Pete