To get a 10 speed shifter to mate with a 9 speed cassette and a 9 speed chain, I got inspiration from an old Shimano backward compatibility blurp deeply buried on the St. Sheldon site. In reality, it works, but is not perfect - the spring in the rear derailleur needs to be very strong to hit the small sprockets quickly - the problem being the angle of the inner cable entering the outer on the rear derailleur is too constrained. Not an issue normally, but this bike was built for speed on fire roads and getting it to shift fast into a higher gear was a bit frustrating.
If you remove the second smallest cog on a 9 speed cassette, it will fit on a 7 speed freehub. The advantage is a nice wide range of gears spread over more jumps. I’ve gone from 12-28 on my tandem to 11-32 this way and kept my 48 spoke wheels.