Question: Do I have to (or is it wise or unwise) to mention having survived a life-threatening illness (such as cancer, a (early) heart attack, etc when applying for a new (non-leading) academic position?

Assume that my health condition is now good enough (and the past health troubles are not obvious from my outward appearance) such that from a medical point of view nothing speaks against my further persuing my academic career and interests. 

Nevertheless, due the specific medicaments I have to take for the rest of my life and some remnants of the past health issues, there might be times my productivity might slightly be lessened. Also, even though the probability is not very high, it can in principle not be 100% excluded that the illness will come back at some point.

Of course I would not mention this in a written application, but should I talk about my health condition in the context of an interview or before things are getting serious and it comes to signing the contract?

BTW I currently live in Germany

Answer: 
**If you think it helps explain a work or productivity gap in your career, I would mention it and I would do so in writing rather than let your prospective employers speculate.** Because overcoming a major medical challenge can help you align your priorities and strengthen you in other ways, doing so can definitely be done in a way that leads one to conclude that it is a strength, not a weakness, of your candidacy.

**If your previous condition is not relevant in these ways, I don't think you have any obligation to bring it up.** Sure, your illness *might* return but *nobody* is 100% immune from serious illness impacting their ability to work or be productive. For that matter, severe chronic illnesses that unambiguously affect productivity (e.g., cramps, migraines, etc.) are simply not the kind of thing that people bring up while interviewing and candidates have no responsibility to do so.

Reminding prospective employers of this can open to the door to (illegal) discrimination based on your medical history and I don't think you are helping either yourself or your prospective employers by bringing it up. When you take an offer, it might be good to let your future department know about your history as background but you might even let this just be raised socially.
If you live in the United States, you are not obligated to provide any information pertinent to disability, including life-threatening illness.
What with competition for jobs being so fierce, you may find yourself
overtly or covertly discriminated against in favour of someone who is
healthier. That's why the Americans with Disabilities Act was passed
into law. Any questions regarding your health from an employer are
also illegal, so you are not obligated to answer.