+1 to this
On the burnout and working with jerks, spot on. Sometimes, there is nothing you can do. Sometimes you can even recognize it in time, other times you can't.
Best lesson, learn to recognize burnout and either take a vacation / get some distance and/or find a new gig.