Using a small rare earth magnet can help deal with sensor sensitivity over larger gaps.
Some bike computers have sensors that do attach the downtube or seat tube (e.g. some Polar units).
Cadence (per se) is of minor interest, and not particularly important wrt performance.
There are a couple of guys at work who use to be fanatical about cadence. They would ask me what my cadence was and I told them I don't know I don't keep track of it. I just run the gear that is most comfortable. I do tend to run in a higher gear then I should and of late I have been trying to not run in such a big gear. Did I say I am really looking forward to this summers riding season.
Cadence is a red herring.
Yeah, there is a lot of myth about cadence.
Provided it's not silly slow or silly fast, then just focus on effort level and choose a gear that feels good. There are some specialist events where cadence is a factor we need to consider (e.g. various forms of track racing) but that's not typically of concern for most regular cyclists.
When we want to properly assess pedal speeds, we need to simultaneously assess pedal forces as the two are not independent variables.
A focus on cadence alone as a performance indicator is like saying you can know the area of a rectangle when you only know the length of one side.