There has been discussion (http://www.erowid.org/archive/rhodium/pdf/cocaine.analog.arecoline.pdf) concerning piperidine-based cocaine analogues in which the ethylene bridge of the tropane ring is excised. As one can see, the carbomethoxy group in arecoline is positioned in the right place, and addition of a substituent at the 4 position produces a substituted piperidine analogous to ecgonine or phenytropane compounds.
Hydrogen bromide in acetic acid should add across the double bond of arecoline in an anti-markovnikov fashion, placing the bromine in the correct 4 position. Ester-halogen exchange with sodium benzoate producing the 4-benzoyloxy ester should produce the direct cocaine analogue in only two steps.
Now, according to the paper linked above, the 4'-iodo analogue of the piperidine analogue of cocaine is somewhat less potent than the 4'-iodo analogue of cocaine itself, which may indicate that the unsubstituted piperidine analogue is itself less potent than cocaine. On the other hand, it may be possible to augment the potency by choosing a substituted benzoyl group, for example salicoyl (http://en.wikipedia.org/wiki/Salicylmethylecgonine).