To say all government funded energy storage companies went belly up is an exaggeration. Many still survive, although you will note a strange anti-correlation between government funding and survival. In my opinion a lot of money did go in the wrong hands. The main problem is that the government is totally confused as to its actual funding strategy -- you need significant, continuous supplies of capital to develop and commercialize hard technology -- every time it fluctuates you impose major stresses and delays.
In at least a few cases, the problem was that the government provided support, and thereafter withdrew it. This was most problematic for the DOE Government Loan Guarantee program -- after Solyndra (a major recipient) went belly up, the government called on their debt in a series of energy storage companies, particularly A123 and Beacon Power. That was the bankruptcy trigger.
On the other hand, it is not exactly like those companies were doing so well anyway. They were fragile, though they might have had a bright future.