Boy, howdy!
I like the way you think. Got me too brainstorming something fierce. Why not take a mini-generator, say the Briggs & Stratton 1532, and stat modding? Decouple the generator from the engine, swing it thru 90 degrees, mount it to a common baseplate, with an electromagnetic clutch mounted on the engine crank, to a same size pulley on the generator shaft? This allows the footprint to go from being an elongated rectangle, to being basically square. Frame it above the generator so you can mount a jackshaft, second electromagnetic clutch on the engine crank out board of the generator clutch (switched so that one or the other, but never both clutches) can be engaged to drive a jackshaft (maybe make the jackshaft from a modified Shimano 3-speed hub), then either chain drive to your rear wheel, or whizzer drive? Set up one of those RC type high power electric motors e-clutched to the jackshaft for when you want to use strictly electric drive, with LiPO batteries to maximize power density while minimizing battery weight.
I bet it can done for about a 40-50 lb weight package, and a dimensional requirement that will fit in a slightly stretched bike frame.