L∞ algebras and tensor hierarchies in Exceptional Field Theory and Gauged Supergravity