This involves a "suspended" or "hanging" hyphen, which has been discussed elsewhere on this site. When editing, I usually discourage its use, mostly because it often interrupts the sentence's flow. For example, if you write "pre- and suffixes", then a reader will likely pause to figure out that you mean "prefixes and suffixes" before moving on. If the reader has to reconstruct the first word, then why not just write it out in the first place? (Of course, in some situations the suspended hyphen may be preferable, for example if space is at a premium.)
Many people find the suspended hyphen perfectly acceptable, and it appears fairly often. However, it is usually used with hyphenated compounds, e.g. "land- and sea-vehicles". Its use for prefixes is rarer. (CMOS edition 14 table 6.1 says, "When alternative prefixes are offered for one word, the prefix standing alone takes a hyphen." It gives the examples "over- and underused" and "macro- and microeconomics".)
There's no strict rule about how close the components must be, but of course you don't want to overly burden your reader. (I find your last example pretty ungainly.)