The modern interpretation of a mechanic as a worker with machinery - eg car mechanic, truck mechanic - is generally dated to the 20th century.
In 1820 it had a wider meaning of a member of a handicraft trade, a manual labourer or artisan.
Carpenter to Mechanic wasn't necessarily a big jump in 1820.