It’s 2024. You can’t develop a low-level disk tool, because there is no such thing as a low-level disk interface anymore. Using the rawest available interface, your tool will be several levels of abstraction away from the level Spinrite claims to operate at. It’s like saying you’re going to get AWS S3 to rewrite an object by accessing it through the HTTP API. I mean, sure, maybe, but any copy will do that just as well.
It may “work”, but the question is whether it works better than simple ddrescue.