I always point people in the direction of the Grain Bikes for pedal powered farm mech, just to see a fairly sophisticated pedal powered machine with a lot of linkages going different directions:
https://projects.sare.org/sare_project/one16-277/
I agree that an angle grinder gearbox would work fine, or perhaps a worm-drive gear out of a dead skillsaw. However, pretty much every dead grinder or saw that i've ever seen had died due to the gearbox failing, so it might be hit or miss tearing apart tools.
Maybe easier than hacking old tools would just be to get a new 90 degree gearbox or two:
https://www.mcmaster.com/90-degree-gear-boxes/
I've never had good luck with flexi-shaft power transmission, but I'm sure there are ways to make them work great.
Your point about going from pedals > freewheel > flywheel is absolutely necessary because you want to be able to stop pedaling without the pedals tearing your legs off.