Your Apple ID is not the same thing at all. Your Apple ID and password are saved on Apple's servers, when the password can be reset. The screentime passcode is NOT saved on Apple's servers. The only place it is stored is on your iOS device. Nowhere else. So there is nowhere else to retrieve it from or reset it from. Your phone unlock passcode is also saved in only one place, on your iPhone in the secure enclave. That's why you need to restore your phone if you forget it, as there is no other place to retrieve it from.
What you can do is go to Settings/<your name>/icloud and turn on all of the switches. Anything saved to iCloud this way will be restored to the phone after it is set up as new and you log in. And any 3rd party app that saves your status on the provider's servers will also be restored when you log in to the app (e.g., Words with Friends and all multiplayer games). So restoring as New is not the end of the world, it's just inconvenient.
It's not a bad solution, unless you want your kids to be able to reset it at will.