Low-degree graph partitioning via local search with applications to constraint satisfaction, max cut, and 3-coloring