Algebraic aspects of higher nonabelian Hodge theory