Apple ID locked, can't unlock or sign out of it
On my iPhone I am asked to log in to update Apple Account Settings, however when I do (with a password I know is correct) I am told my account is locked for security reasons. Trying to unlock it, I am given two options. Either send an email to a recovery email I know doesn't exist anymore or answer security questions. My account is about a decade old, I don't remember what I put for my answers.
I am now stuck with a locked Apple ID. I have a secondary one (from which I am writing this post) I could switch to but my iPhone won't even let me sign out of the current one as I would have to confirm the password leading to the same steps as described above.
The only solution I have come up is this: If I do a backup via iTunes and then factory reset, will restoring the backup allow me to change my Apple ID and retain all my data (apps, photos, contacts, WhatsApp etc)?
I would also appreciate a different solution approach if one exists. I also have an iPad that uses my secondary Apple ID if that could somehow help in solution efforts.
iPhone 12