Someone once told me there was nothing to be gained from local optimizations. And while that seems logical since that will only bring us to the next bottleneck, there is of course the fact that no change is constant, but the only true constant is change!
So yeah, Tesla's design choice to create the 4680 cell for their storage needs may have been a local optimization that just made the cell with the highest storage density may have been a limited optimization, but it is not the only optimization that makes Tesla's designs and manufacturing methods the best in the business. One of Elon Musk's mantras is: "The best part is the part you can take out!".
The same goes for programming code: if a line can be simplified without making it hard to read in the process, simplify it. But remember that ruthlessly simplifying code may be better for execution, but can make augmenting and debugging the code later on much more difficult!