Getting shipping rates based on weight from a carrier is the safest way to ship rather than defining own rates based on weight. The reason being, you can undercharge or overcharge if there is a manual rate configuration. Hence you can use Multi Carrier Shipping label app which allows you to calculate rates based on weight. Also, if you are sure as to how many products should go inside a box, then you can define the quantity in the app. And the charge will be calculated based on that.