If with the other cable the symptoms are the same (it only charges in certain positions), then my recommendation is that you try to see if with a few drops of isopropyl alcohol on the brush you are able to remove the small dirt you see in the USC-C port (with the phone turned off, and then letting it dry for a while before turning it on or plugging it into the charger).
If that doesn’t work, it might be worth taking the phone apart and cleaning the contacts. Or replace the bottom module to see if that’s the problem (before buying a new one, and if you have a #fairphoneangel near you, you can contact them to see if they can help you).
And remember that this is a user forum and not official Fairphone support, so, especially if you still have your phone under warranty, you might want to #contactsupport.
I hope you get it fixed soon.