Can an odometer (magnet) be attached to an exercise bicycle crank arm (not the pedal)?
For your requirements this would work fine.   The speedo readout would not reflect a real-world value, but for comparing efforts on the same bike it would be ideal.
I'd suggest the lowest priced wired Cateye bike computer (velo9 or similar) because it lasts years on a battery.  I've had cheaper bike computers, and they can eat batteries in a few days.
For fitting, I'd try mounting the receiver end of the wire somewhere near the L of Landis on the housing, using double-sided sticky foam tape.  Secure the magnet on the inside of the crank, such that it won't get banged by your shoe.
Great work for finding a solution.