For the gear lever, I've flattened the surface at the thread side, to accomodate a counter nut to lock the bolt in place. Add loctite in addition, and it should never fall off if tightened correctly in the first place.
See last picture.
To keep the kick cotter in place (and other parts), maybe drill a hole (should be quite small so as to not weaken the cotter at the threads) trough nut and cotter (at the correct nut location when tightened, of course) and fit a locking pin. Or jut using a self locking nut (if available in that dimension?), or loctite, would help a lot. Or fit a second (thin) nut to lock the main nut. Or cut\file a small groove for a circlip. btw, am needing a new, fresh cotter.