I have this weird issue with my Max where sometimes when I plug the charging cable in it take between 20 seconds to a minute before it detects and starts charging. It is very intermittent and is instant 99 percent of the time. When it doesn't detect the cable right away it will after a min or so. I've tried different Apple cables chargers etc, If is test it by unplugging the cable and plugging it back in 20 times its flawless. I try wiggling the cable and it does not break the connection at all. Its rock solid. I cleaned the port and its fine. The fact that its very intermittent and always start charging when it does happen without touching the phone or cable tells me it’s some sort of software issue.