How to make shelf-stable chocolate milk?
The major protein in cow's milk, casein precipitates at pH 4.6. It matters very little which acid you use to get to 4.6, casein will still precipitate. pH 4.6 is about the same acidity as canned beets, a food not known for its tartness, so you won't achieve a very sour flavor before things start curding up on you.
Adding emulsifiers could help some with the isoelectric precipitation, but emulsifiers have flavors too, and you'll have to add them at a not insignificant fraction of the protein (casein) concentration.

For shelf stable chocolate milk, I'd go with a mix of powdered milk and cocoa powder; just add water. All the storebought room temp chocolate milk products I've seen are ultrapasturized or similar.