A little heating during charging is normal, but a "almost hot" body is already a reason to pay attention. iPhone 15 Pro Max supports fast charging via USB-C, and the process is accompanied by heat generation, especially if the phone is doing something at the same time or is in a case. However, "hot" is already beyond what's acceptable. Check a few things: remove the case while charging and see if the phone itself is heating up or if it's limiting heat. Make sure the USB-C port is clean, without dust or debris that could cause contact resistance. Try a cable with a different power adapter (if you have one) or even charge from a computer via USB - the speed will be lower, but this will help figure out what's going on.
As for the cable itself, a defect is possible, but it's not the most common case. If it's heating up specifically with the original Apple cable and adapter, and nothing changed after cleaning the port, ask the service to check the battery - sometimes the problem isn't the charging, but the battery itself, which has started to incorrectly perceive the current. The balance between temperature and capacity that you described is a bit strange. If the battery is holding up normally, but the body is heating up significantly, this could indicate a problem specifically with the charging circuit or cable. In any case, don't hesitate to contact the service before this develops into a more serious problem.