Looks like outline-hide-body
does exactly what you want:
Hide all body lines in buffer, leaving all headings visible.
Note that this does not hide the lines preceding the first heading line.
So after creating the sparse tree use M-x outline-hide-body RET.
Or create a custom command that calls org-occur
and hides the body lines afterwards:
(defun my-org-occur-and-hide-content ()
"Interactively call `org-occur' and hide body lines after."
(interactive)
;; Temporarily add an advice to `org-occur'.
(advicecall-addinteractively 'org#'org-occur :after
(lambda (&rest r)
(outline-hide-body)
(advice-remove 'org-occur 'my-org-occur-advice))
'((name . my-org-occur-advice)))
(call-interactively #'org-occur))
Call it with M-x my-org-occur-and-hide-content RET.
Result with the example from the question: