I mean what you suggested already kind of exists in several forms.[0,1]
Third party data analyses is a thing, but this is often bundled with conducting experiments by CROs.
See my other comment about market size. The problem is that you can make A LOT more money selling drugs than you can selling software to pharma companies. So if your software is any good, then you should use it to make drugs and just be a pharma company.
0. https://www.opentargets.org/
1. https://www.citeline.com/en/products-services/clinical/pharm...