Just a couple commands:
This one command outputs the information that you see in the System Information.app (About this Mac -> System Report...). The information included is: PCI, Displays, Thunderbolt, USB, and Ethernet.
system_profiler SPPCIDataType SPDisplaysDataType SPThunderboltDataType SPUSBDataType SPEthernetDataType > system_profiler.txt
This command shows the hierarchy of devices connected to the Thunderbolt ports on an Intel Mac that has Alpine Ridge or Titan Ridge such as your 16 inch MacBook Pro:
ioreg -filrw0 -k "TBTPCI_LC" > ioreg_Thunderbolt.txt
The above may only work for Thunderbolt 3 Macs. For Thunderbolt 2 Macs, this should work:
ioreg -filrw0 -k "PCI-Thunderbolt" > ioreg_Thunderbolt.txt
If you have an M1 Mac then this command should be used:
{ ioreg -filrw0 -k "thunderbolt-drom"; ioreg -filrw0 -k "atc-apcie-oe-fabric-tunables" } > ioreg_Thunderbolt.txt
I'm not sure what to do with Ice Lake Macs (10th gen CPU). I would need the entire ioreg to find out how to extract just the Thunderbolt bits.
ioreg -filw0 > ioreg_All.txt