The right way to achieve this will be to first configure your product weight & dimensions and then add custom boxes based on your product dimensions. Since this is not possible with Shopify you can accomplish this with PH MultiCarrier Shipping Label. The app allows you to set custom boxes & automatically choose the box based on your product dimensions.
Let me know if you have any queries. I will be happy to help!