There used to be a program by mlin.net called TraySaver about 10 years ago that did exactly this "via an insane combination of shell hooks and system calls", I don't know if it's still around though or XP+ compatible.
The reason it's not really possible to just restore the icons, is because the icons are displayed by each program. When explorer.exe crashes, the icons won't automatically be redisplayed UNLESS the program was written to detect crashes and resubmit it's icon to the system tray. Most good programs have this code, but not all.