Manufacturers worldwide are nowadays in pursuit of sustainability. In the Industry 4.0 era, it is a common practice to implement decentralized logistics areas, known as supermarkets, to achieve production sustainability via Just-in-Time material delivery at assembly lines. In this environment, manufacturers are commonly struggling with the Supermarket Location Problem (SLP), striving to efficiently decide on the number and location of supermarkets to minimize the logistics cost. To address this prevalent issue, this paper proposed a Simulated Annealing (SA) algorithm for minimizing the supermarket cost, via optimally locating supermarkets in assembly lines. The efficiency of the SA algorithm was tested by solving a set of test problems. In doing so, a holistic performance index, namely the total cost of supermarkets, was developed that included both shipment cost and the installation cost across the assembly line. The effect of workload balancing on the supermarket cost was also investigated in this study. For this purpose, the SLP was solved both before and after balancing the workload. The results of the comparison revealed that workload balancing could significantly reduce the total supermarket cost and contribute to the overall production and economic sustainability. It was also observed that the optimization of material shipment cost across the assembly line is the most influencing factor in reducing the total supermarket cost.