That’s available in many apps. SportTracks supports equipment hierarchies, for example, so you can have a chain with a set life cycle and mileage tracking that’s a part of a bike which has its own lifecycle and mileage tracking. Whenever you select the bike for an activity, the “part-of” objects also get tagged for the mileage. You could even move the chain to another bike…
This said, it’s easier to look at these features than to actually use them in real life. Who remembers to go change the chain in the app after changing it on the bike?