The lockers near the parking lots are communal. No idea why a lock would be on one, though I have used a lock on my campsite locker before to secure valuables that I didn't want to leave in the car (convertible with a broken door lock).
I have never seen them so full that there was no room to store more food, though you might have to use one a little farther away from the trail head.
Make sure you mark your items with your name and expected return date or you may end up with a tag on your package notifying you when the items will be removed. My bear can that I used on my Lone Pine Peak trip, but did not use on my Whitney day hike right after was tagged a few weeks ago.
Unless you have several massive coolers to store, you should not have any worries.................................DUG