how damaged is the "damaged phone with working lightning port"?
can you use that phone's back case with the lightning port flex in-tact?
generally speaking if it's a flex assembly with adhesive, i don't remove-recycle-swap because of the risk of incurring damage to the assembly during the removal. the lightning cable flex is not that expensive and can be ordered here at ifixit, injured gadgets or mobile sentrix (i would avoid ebay and aliexpress - they may have good parts, but their customer and technical support is rather lacking).
swapping is still a viable solution, but if things don't quite work right (or work badly) you've got additional troubleshooting time, and the risk of damaging other components during the disassembly and reassembly. you will have to spend the time to remove the bad flex, and the time to install a replacement, so why not just install a new one and have the piece of mind that you shouldn't have any problems with it.
my humble $0.02 worth.