Your concern is mounting the motor in your smaller loco, not so much steam or dismal … Old style was to lay the motor down on the frame and use a worm and spur gears to power an axle.There are G locos with the vertical can motor too.
Don’t get an old Pittman motor they were open and collect dirt, cans are usually better.
My newer stlye C-16 from Aristo uses a belt drive from motor to drive line. Mount the motor in your boiler and run the belt down in the fire box to the drive line… a worm could be used on an axle gear… Aristo powered each axle, some rely on rolling traction and cheap side rods to move the other drivers. Too often, G blind drivers are elevated to prevent them from dropping below rail head height on toy curves. Prototype blind drivers have a wider tread than flanged wheels to keep them on top.
Some folks actually build the drive train first! nudge nudge then fit the loco over it! Really go figure! (http://www.largescalecentral.com/externals/tinymce/plugins/emoticons/img/smiley-laughing.gif)
Now you need to figure out what size motor will fit and where…