I'm surprised they don't include the following in the documentation here: https://help.salesforce.com/articleView?id=account_hierarchy_setup_lex.htm&type=5
In the Hierarchy feature (which can be applied to several objects, not only Account), if you hover any record, a small modal appears, displaying some fields and related lists. This is your object's "Compact View".
To add, remove or reorder fields here, simply go to Object Manager > Object (Account in this case) > Compact View > edit default or clone new > Add, remove or reorder fields.
![enter image description here](https://i.sstatic.net/exPFQ.png)
From here, this can get powerful. Consider adding Rollup Summary fields to your object. For example, per Account in the Hierarchy, I want to know how many Opportunities on each. Simply create that Rollup field on Account and add it to the Compact View. That's COUNT. You can also some Amount of all Opportunities associated with an Account.
Now, it gets trickier if you want to Rollup across multiple levels of parent and child. It may or may not be possible by adding a farely advanced FORMULA field that adds up everything. Now, I'm considering iTools Hierarchies or Rollup Helper on AppExchange for this more advanced use case. The fields I create with either of these tools, I'll simply add them to the same Compact View.
You can edit the fields shown in this Hierarchy view which is native to Lightning. You can add custom Rollup Summary Fields next to where it shows Type, Phone, etc.
This might help get someone started on figuring out such an advanced formula as I postulated above:
IF(NOT(ISBLANK(Parent.id))
,Parent.Oppty_Amount_Total__c
+ Parent.Parent.Parent.Parent.Parent.Parent.Oppty_Amount_Total__c
+ Parent.Parent.Parent.Parent.Parent.Oppty_Amount_Total__c
+ Parent.Parent.Parent.Parent.Oppty_Amount_Total__c
+ Parent.Parent.Parent.Oppty_Amount_Total__c
+ Parent.Parent.Oppty_Amount_Total__c
+ Parent.Oppty_Amount_Total__c
,IF(NOT(ISBLANK(Parent.Parent.id))
,Parent.Parent.Parent.Parent.Parent.Parent.Oppty_Amount_Total__c
+ Parent.Parent.Parent.Parent.Parent.Oppty_Amount_Total__c
+ Parent.Parent.Parent.Parent.Oppty_Amount_Total__c
+ Parent.Parent.Parent.Oppty_Amount_Total__c
+ Parent.Parent.Oppty_Amount_Total__c
+ Parent.Oppty_Amount_Total__c
,IF(NOT(ISBLANK(Parent.Parent.Parent.id))
,Parent.Parent.Parent.Parent.Parent.Oppty_Amount_Total__c
+ Parent.Parent.Parent.Parent.Oppty_Amount_Total__c
+ Parent.Parent.Parent.Oppty_Amount_Total__c
+ Parent.Parent.Oppty_Amount_Total__c
+ Parent.Oppty_Amount_Total__c
,IF(NOT(ISBLANK(Parent.Parent.Parent.Parent.id))
,Parent.Parent.Parent.Parent.Oppty_Amount_Total__c
+ Parent.Parent.Parent.Oppty_Amount_Total__c
+ Parent.Parent.Oppty_Amount_Total__c
+ Parent.Oppty_Amount_Total__c
,IF(NOT(ISBLANK(Parent.Parent.Parent.Parent.Parent.id))
,Parent.Parent.Parent.Oppty_Amount_Total__c
+ Parent.Parent.Oppty_Amount_Total__c
+ Parent.Oppty_Amount_Total__c
,IF(NOT(ISBLANK(Parent.Parent.Parent.Parent.Parent.Parent.id))
,Parent.Parent.Oppty_Amount_Total__c
+ Parent.Oppty_Amount_Total__c
,IF(NOT(ISBLANK(Parent.Parent.Parent.Parent.Parent.Parent.Parent.id))
,Parent.Oppty_Amount_Total__c
,111.00
)))))))