Automatic nonlinear MPC approximation with closed-loop guarantees