A bad pin on the power port would explain why it was having trouble charging. I would have expected your replacement battery to have some small amount of charge, though, so I'm a little surprised that it didn't come on with the new battery, at least until it drained the battery and couldn't recharge it.
It is possible, however, that the battery came fully discharged such that the battery alone wasn't sufficient to power up the phone. It's more the exception than the rule, but it certainly does happen. The fact that you were able to charge it wirelessly says your new battery is almost certainly fine and the issue with it now is that it's not getting charged by the lightning port.
It may be possible to bend that pin back into place, but you'll need to be careful about shorting the pins and causing yourself more problems. If you're going to try, I'd suggest opening the phone up and unplugging the lightning port connector on the motherboard to be safe; unplugging the battery would be the next best choice.
Ultimately, the correct fix here is to replace the lightning port. Unfortunately it's a huge pain in the butt on your phone since it's routed under the motherboard so it ends up requiring you to take out a lot of parts to get to it. But it is quite doable; if you've successfully changed the battery then you've already got the skills you need to accomplish this!
I'm going on the assumption that when you say the wireless charger worked, that means the phone was able to boot up and operate correctly, so if that's not the case let me know since we'd need to figure out a different strategy.
Anyway, the guide for replacing that lightning port assembly is right here on iFixit.
iPhone 8 Plus Lightning Connector Assembly Replacement - iFixit Repair Guide
And of course you can buy the parts you need here, or any of the major sites like eBay, Amazon or AliExpress, among others.
iPhone 8 Plus Lightning Connector Assembly