How do I view the lifetime total from the Health app?
disclaimer: I recently released a new app that displays your (lifetime) Apple Health and workouts data.
The app is called “Health Stats”. Health Stats is a free app (with a one-time premium in-app purchase) that allows you to easily view your health, activity and workout data from the Apple Health app. You can view this data for different date ranges such as: lifetime, this week, this month or set a custom date range yourself.
You can download the app here: https://apps.apple.com/app/health-stats/id1543220823
Health Stats currently supports the following health and workout data sets:
General data sets:

Total exercise time
Total step count
Total walking and running distance
Total flights of stairs climbed
Total stand time
Total stand hours (hours in which you've stood and moved for at least 1 minute)
Total wheelchair pushes
Total wheelchair distance
Active energy burned
Resting energy burned
Total energy burned

Workout data sets:

Total workout time
Total workout distance
Total workouts
Running workouts (time, distance, energy burned and count)
Walking workouts (time, distance, energy burned and count)
Cycling workouts (time, distance, energy burned and count)
Swimming workouts (time, distance, energy burned, swimming strokes and count)
Elliptical workouts (time, energy burned and count)
HIIT workouts (time, energy burned and count)
Strength workouts (time, energy burned and count)
Skiing workouts (time, distance, energy burned and count)
Snowboarding workouts (time, distance, energy burned and count)
Hiking workouts (time, distance, energy burned and count)

Note: all data is directly received from the Apple Health app and none of it will ever leave the iPhone or is stored elsewhere.