It’s true that other fields, even other kinds of engineering, have a professional licensing requirement. Even so, there are a lot of jobs that lawyers do that can be easily automated and have been for a long time (common contracts) but I would want a real lawyer to represent me if I was the defendant in a criminal trial.