FWIW when I had starter motor issues it never threw any error codes, it just clunked and never span. It sounds like you've got some really odd electrical gremlins there somewhere, perhaps dodgy earth, or a failed battery cell (battery giving good voltage, but a dodgy cell can cause all sorts of issues).
Is the battery original?
_________________________