How to reset OS X volume after sleep using launchd?
The second launchd job ticket format is almost correct. Only a set of quotes need removing.

Quotes

The quotes are no longer needed in the second launchd job ticket, so change:

&lt;string&gt;"set volume output volume 0"&lt;/string&gt;


…to…

&lt;string&gt;set volume output volume 0&lt;/string&gt;


Grouping Arguments

In this case, the quotes grouped the set of arguments for osascript to see as one item. Thus osascript gets two arguments, the flag -e and the script. This meets the requirements from the osascript manual.

When called through Terminal.app and thus through the shell, the quotes are needed to perform the grouping. When osascript gets the arguments, the shell has removed the quotes.

Without quotes, spaces subdivide each item passed via the shell.

When called through a launchd job ticket, the grouping is intrinsic within the array passed as ProgramArguments. In your first ticket, the array contained nine items and in the second ticket, the array contained three.

LaunchAgent

Be sure to add this launchd job as a ~/Library/LaunchAgents as osascript requires an active user with a graphical session.

This approach approximates what I do with Power Manager in How to Set the Volume When Logging In.