The company I work for (X-Team) employs several methods to keep their developers productive and, even more importantly happy and anything but burnt out. This goes from having staff members whose job is to keep morale and motivation up, to things like organizing staff meetups, and a whole in-company "parallel RPG universe" with developers taking on the roles of the heroes of the story, and much more.
I would like to present an overview of these methods, so other companies and developers may also benefit from these tried and true approaches, which, at least in my experience, go incredibly far past anything offered in your typical firm, especially considering we're a 100% remote company.
Employers will get numerous ideas for increasing employee productivity, morale, and sense of community and camaraderie, and employees themselves will see that even considering IT employees being relatively well taken care of as it is, there is a whole 'nother world out there, and will hopefully take these ideas, at least those, that are free or at least very affordable, to their employees for implementation.
Basically, I'll try to provide several ingredients that, each on its own, can already produce results, but together foster an almost cult-like loyalty and sense of happiness - and I mean that in the most positive way possible.