Just a small tip - algorithms are subjective and can be easily fixed. Data organizaiton (data structures) and its relationships is king. Inversely, its poor data organization (poor usage and design of data structures) can screw up data.
Part of that organizaiton can be an audit table to go alongside with whatever data you’re messing with to capture who is making changes in the database that is of error.
This should help leave breadcrumbs to ensure corrective guidance and action is taken to correct bad manual entry. It also leaves breadcrumbs for faulty algorithms that results in poor automated entries too.