I use magnetic cable adapters for my phone, have for 10 years now.
Started as a way to mitigate ports failing on a phone prone to it, now I can't imagine using regular cables.
This is a pricey one, I've always bought multi-packs for the same price.
They come in a variety of orientations.
Just attach the cable where you need it leaving a little flexibility and it'll click in.