This sentence appears among the subtitles to an episode of Die Chefin:
Ich meine nur von Alters wegen.
Duden does not have a noun "Alters", and searching DWDS and Linguee returns no examples of "von Alters wegen". A few examples of "von Alters" can be found in DWDS, but those appear to be genitive usages. Is this sentence dialect (the story takes place in Munich)?
There are two prepositions concerned with Alters here, von and wegen. What grammatical rule says that "wegen" has precedence and not the dative-requiring "von"? Duden identifies the "von ... wegen" under "Phrases, idioms, proverbs", but does not indicate how to decline the middle contents. I could find nothing in DWDS about von...wegen.