I would suggest looking into Health Connect. I think it might still be in beta, but Samsung Health can already put some data (like at least sleep and exercise sessions) into Health Connect for other apps to fetch. And Health Connect isn't just for data from Samsung Health, but will likely include an ever-growing variety of apps. One integration to swat a whole lot of flies 😁