wp_logout
is being triggered server side when the user is logging out, but the fact that it is being triggered do not indicate that there is a browser on the other side that actually triggered it. For example a user might log out via Ajax and then the JS code will not be evaluated.
In any case, it is much better to define a logged out user as one that do not have the authentication cookie. You can do something like
if (value in local storage) {
if (wordpress cookie exists)
remove value from local storage
}
Anyway, if you want to be able to control client data from the server you should use cookies instead of local storage.