This day is solved with a spreadsheet. Not with VBA, not with Apps Scripts, just a "simple" spreadsheet with formulas. Rather than copy a spreadsheet to git, I'll just link to the Google Sheets version:
https://docs.google.com/spreadsheets/d/1BpxY6tYyWKyO2PQEekVA3P6uoiasWHm3dj4x-QE0eX0
The sheet works only if the most deeply nested object is less than 960 jumps from COM.
To use it, make a copy of the spreadsheet, then copy-paste your input in the first column of the "Input" tab.
Problem: Universal Orbit Map