The definition is....
a person who designs, builds, or maintains engines, machines, or structures.
You also have the shipyard definition which is 1st, 2nd and chief engineer. A pilot does the driving now though mainly on ships but I think the term still stands.
Obviously you have chemical engineering etc but that’s not an area I understand.
I always class myself as a diesel mechanic first but as a service engineer I do much more than just fix engines. I’m currently laying down a power station, which is a huge job and mainly not involving much mechanical work.
I would class myself as an engineer as I engineer things, I would not though call myself that officially, so no letters after my name or business cards
Also, I would class a fitter as someone equal to a mechanic, mechanical fitting work is a very highly skilled trade in itself.
Dave!