That is a greater good argument, but who really benefits here? In a somewhat best case scenario, some big companies and their equity owners gain all the data and perhaps develop proprietary solutions only they can prescribe. We then sacrifice our collective health privacy for some people who might benefit if they pay an uncompetitive price for the treatment. In a worse case situation, no cures or treatments are ever found, but these companies benefit from the surveillance and knowing what existing drugs and treatments they should invest money in to profit from, allowing them to game the market.
If this data was held in the commons and the benefits such as cures or treatments were not patented, we might have some incentive to provide it. In this case, everything is privatized for the benefit of a few.
I agree that Nextcloud is a great solution. Some other cardDAV and calDAV solutions exist, but Nextcloud provides much more. Here is a little demo of Nextcloud on a handset. https://videos.trom.tf/videos/watch/5fc16e0e-f95f-45a2-9843-37749bf9dada