Currently levers are semi-magical able to act at infinite distance with no real drawback, their are obvious reason why we don't want to force a physical connection between a lever and what its linked too. But why not require that some rope or chain be consumed in the process of linking these distant points.
It would make things slightly less magical while providing a new use for rope/chain which is currently only useful for restraining things (prisoners & animals). The number of rope units needed would be proportional to distance but modest say 1 unit per 10 tiles distance beyond 1 (so an adjacent lever requires no rope). Distance would be a simple summation of the difference in position across the 3 axis, so point (3, 5, 10) and (7, 2,
is 7-3=4, 5-2=3, 10-8=2, 4+3+2= 9 distance for 1 unit of rope. All types of rope would be equally effective for now but some day their might be speed bonuses if some ropes are given better 'stats' then others.
The dwarf linking the lever will need to bring the rope to the lever and/or linking target and 'attach' it as they do the mechanisms. When de-linked about a quarter of the rope would 'explode' out of the lever and another quarter from the linked object and would be reusable, the rest would be lost. Their have been ideas that mechanisms will need more maintenance and 'oiling' in the future, if so then a periodical replacement of these ropes as they rot or vermin gnaw at them could be another source of maintenance, metal chains would of course be immune to this wear.
EDIT: Due to a great deal of ERRONEOUS (and frankly stupid) speculation that their should be a physical connection required between levers and the things they trigger let me repeat categorically that not what I'm proposing, ropes & chains would simply be consumed in the linking process just like mechanism are currently consumed, that is ALL. Any thing else is a ludicrously BAD idea and I would ask that people NOT speculate on it in this thread.