It's a little bit more tricky than that. What the EXIF might tell you is the camera calibration parameters like focal length, distortion, perspective center, etc. That can be used to fix systematic errors in images like pincushion/barrel distortion.
To unwarp photos that were taken at odd angles you need to do some image processing. The mathematics aren't particularly difficult, it's a homography transform in most cases (rectangles). The problem is robustly detecting the page.
I've been using CamScanner on Android since forever. I only stopped a few months ago because I moved to iOS (and didn't realize it's also there).
It does the page detection fairly well, but also let's you correct it. Very useful, specially when the picture is bad. I then used to upload it to Dropbox.
Right now you can enter comments for a document that's already uploaded. A few UI tweaks could be added to show the latest comment under the document preview.
Only incompatibility issues were with some of the config file entries. These need to updated as explained in the release notes -> https://docs.mayan-edms.com/releases/3.2.html#backward-incom...