That might have been one of the goals but I doubt it was the only goal. Another reason for removing the headphone jack is dust and moisture ingress protection. It's difficult to achieve an IP67 rating in a phone with a 3.5mm TRS jack. This is due to the shape of the connector and the extra thickness you need to add to accommodate a jack with sealing rings. By switching to the lightning connector exclusively, Apple was able to achieve IP67 ratings in all their phones after the change.
This is a huge improvement for users because previously a lot of phones were being brought in for service showing liquid damage. Having your phone die due to dropping it in some water is a terrible experience that is now quite rare due to the IP67/IP68 ratings of modern phones.