Same sort of thing has just happened to me on iPad 2 and iPhone 4S, both on iOS 9.3.5.
The iPhone 4S I've had powered on and connected to Wifi continuously for the last few years, using it mostly as a homekit light switch remote control. I changed the battery this past June since the old one started to swell and break open the phone (no damage to the device occurred), so it probably was last rebooted then, without issue, since I rarely allow it to run out of battery and shutdown.
A few days ago, I tried to access App Store and got strange error message, "Verification Failed" after entering the correct Apple account user name and password. Then last night, out of the blue, it displays a message, "Activation Required." Of course, trying to do that, we land at the "Device Unknown" activation failure screen.
So it isn't even a factory reboot or backup restore that causes the issue; it can happen on its own while the phone is running smoothly, without notice, and lock you out permanently. Connecting to the MacBook yields the same message. See attached. So you cannot even execute a backup to get your data once this happens.
Frankly, this is gross negligence on the part of Apple and seems like a termination of the iOS License Agreement without cause or advance notice. Any valuable data, priceless photos, paid third-party apps, etc. that are stored on the device, access to them lost in an instant without warning.
As you can tell, I'm really upset with Apple right now. I just watched the YouTube video, "I hate that you made me love you" on the iPhone 4S itself the night before they locked me out. That's about how I feel about Apple right now. If they are going to drop support for a device, their last iOS update should have dropped device activation, or at least they should have issued one before they did this and given sufficient notice or a way for their support agents to untether the device from them since they don't care about it any longer.



[Edited by Moderator]