If I’m understanding your question, you replaced your port because it died and wouldn’t charge no matter how long you left it on the charger for, correct? If that’s the case, it may not have been the charge port itself. If you use non MFI (Made for iPhone/iPod/iPad) accessories like the ones you can find for cheap at gas stations, eBay, Amazon, etc. then you most likely damaged TriStar. TriStar is a usb validating chip inside your phone and can get damaged when using these lower quality accessories as they lack proper surge protection.
There are a couple ways you can go about diagnosing this issue. You can order a USB ammeter like this one: https://www.amazon.com/DROK-Multimeter-M... . Plug this into a wall brick and then connect the charger to the ammeter and pay attention to the numbers next to the letter “A” which stands for amps the device is drawing. If it jumps between 0.00 and 0.01 amps that’s a pretty good indicator. There’s also a special tool you can get called a TriStar Tester which can test the charge port and TriStar for potential faults. This tool gets a little expensive at around $150 but if you call around your local repair shops they might have one and it takes just a couple of minutes. They might have a fee but if not, tip them a couple bucks.
Now if the chip is damaged it’ll need replacement, which requires a skilled tech as it’s very intricate work with a hot air soldering station. But a quick or temporary fix for this would be to either charge the battery in another device or replacing it. As long as you don’t let the phone die completely as in you get the low battery icon on the screen you should be ok. But keep in mind, that will only be a temporary fix.