The iPhone 7 and iPhone 8 use different battery connectors. The iPhone 7 and 6s use the same connector but the cables are different lengths and it causes the battery percentage to be wrong. You can test an iPhone 7 with a 6s battery though. The iPhone X and 8 plus have the same battery connector also, although I don’t know if it will supply enough power to turn on either one. In short, no, iPhone 7 and 8 batteries are NOT interchangeable.
It is definitely possible to bypass iCloud Activation Lock but it isn’t possible to fully “unlock” it. In other words, if you reset or update the device, it will become locked again. Any iPhone 5s to X can be bypassed untethered on iOS 12.3 to 13.2.3 with the checkra1n jailbreak. You can also bypass any iPhone 5s to X on iOS 13.3+ with a paid bypass for $15 that I’ve tested on 2 iPhone X and it works but its Tethered so if the device dies or reboots, you’ll have to bypass it again. Sim cards/cellular/SMS/phone calls don’t work with any of these bypasses along with iMessage and many other small things. Also, please remember to not do this with stolen devices, try to get it back to the owner first. I once bought an Activation Locked iPhone X on eBay for parts and once I turned it on it had a phone number to call. I called that number and returned the phone. The owner rewarded me $200 for returning it. The moral of the story is to return it if its not yours. Edit: It is possible to unlock an Activation Locked...