Yes, hair oils are the same as body oils, both come from sebaceous glands on the scalp.
Unfortunately, we end up washing most of them away before they have time to work their magic on our dried, cracked hair but hey, that’s why we have conditioner.
Showering less often would work, except you end up smelly after a couple of days. And then your hair starts getting too greasy, so please, have that shower, having shiny hair isn’t worth the stink.