I'm not convinced that mashing is so bad for knees. The leg motion is more akin to running (a naturally evolved movement), and the pressure/impact is much less than running, neh?
I alternate sitting and standing going up steep hills, with one gear higher whilst standing.
Bicycling any which way is good for your knees I believe - though that is a bit of a sweeping statement, I admit, lol
I agree that regular riding is good for knees, but I disagree about mashing, my skinny knees really dont like it and reducing the pressure by reasonable to higher cadence really is easier on my knees.