I got the same error today (iTunes unknown error 7, swipe up to upgrade, enter passcode does not working...) and I solved it.
Result: Successfully recovered and upgraded to iOS 17.5.0 β, can use the phone normally, photos and all app data are kept (presumable no data loss), 100% local recovery without using any iCloud/external backups (since I don't have any backup).
This is what I did and what happened to me. I post it here to potentially help someone who are in the same trouble. But, my success may due to I'm lucky, so if you cannot reproduce what I say below, please don't blame me. Also, because I'm a computer science student, I have some knowledge and experiences on dealing with operation systems, and this may be another reason why I can find my way to success by myself. This only worked for me, doesn't mean it will work for everyone. As a result, if you decided to follow what I said below, you need to fully responsible on any data loss and/or any bad results happens to your own device. I WILL NOT BE RESPONSIBLE FOR ANYTHING HAPPENED TO YOUR PHONE IF YOU DECIDED TO FOLLOW WHAT I'M SAYING BELOW! (Also, my final solution involved a β version of iOS which may not be stable and contains vulnerabilities, please try at your own risk)
(iPhone 11, Windows iTunes, didn't make any backup before upgrading)
I tried to update to iOS 17.4.1 from iOS 15.x at the beginning. Because my device didn't have enough space to download and update, I connected my device to iTunes on my PC and started upgrading to iOS 17.4.1 . At the beginning iTunes told me I need about 1.2 GB on my phone to upgrade, and I deleted some apps on my phone to make 1.4 GB available. The first attempt failed with "unknown error 7" after the verification process after upgrading fireware and software. Then my phone stuck in the "swipe to upgrade" and "enter passcode" (with full keyboard) screen. All my passwords, from my phone's 6-digit password to my Apple ID's password, are NOT working at all.
Then, I manually switched my phone to DFU mode (recovery mode) and clicked "upgrade" on my PC's iTunes again. This time, no error presented, as iTunes told me my phone was successfully upgraded. But the trouble didn't end here. When my phone entered the main screen, I found that all my personal apps are missing, and even some system apps (for example, Call, Messages, Safari and even App Store) are missing. Most of the rest apps which didn't missing cannot use (quit instantly when I touch the icon) except Settings, Tips and Calculator. And my wallpaper becomes pure black. I tried to reset all settings (while keeping personal data) in Settings, but after reboot everything still like that (black wallpaper, missing apps, apps cannot use). I tried go back to DFU manually, upgrade again iOS 17.4.1 with iTunes, and nothing changed. And even worse is that when I connect my phone to PC iTunes, my phone ask me whether to trust the computer, I clicked "trust" but iTunes on PC still tell me does not trust. Seems the connection between iOS and PC are also broken. Now my phone is a half-brick. Can boot, can see the main screen, but no App Store, no Safari, no Phone Call and Messages, apps like Camera can not open, even no connection to iTunes under normal mode (DFU mode can connect)... Another interesting thing is that, when I open the storage settings, I found my phone automatically cleaned up more than 20GB of available space (remember that when I started the upgrade at the very beginning, I only have 1.4GB available on my phone.)
Then, I found that a third party apple device management software on PC offers an official IPSW download of iOS 17.5 β version (which does not directly downloadable in iTunes which seems only offers the latest stable version, not β versions, to users). I downloaded the IPSW for iOS 17.5 β then enter DFU and use iTunes to install this β version of iOS (press Shift while clicking "upgrade" in iTunes will pop up a window to let you manually selete the IPSW file to install). After a normal upgrading progress, my phone showed up a GUI that is similar to what you see when you just by a new iPhone. From "Hello" screen, Wi-Fi settings, set password, set face ID, and some settings related to privacy, then, everything came back!!!! I see my lovely wallpaper covered with the icons of my personal apps again! And it seems that no data lost since all my chat history in my chat app are still there. And my system is now iOS 17.5 β. Presumably a successful recovery without any data loss and didn't rely on any backups!
I think the initial problem is caused by low available space in phone when starting upgrading, and I upgraded: iOS 15.x --> Unknown Error 7 --> Swipe to upgrade --> iOS 17.4.1 (But still broken) --> iOS 17.5 β to solve all the problem. It may due to my luck, so my experience may can not be reproduced easily. But still, hope this is helpful to you who are also in the same trouble (unknown error 7, and swipe to upgrade with passcode). Good luck!