Slow and laggy Macbook Air 13" mid-2012 (A1466)
The general process I have for rehabilitating old hardware is a complate wipe.

Back up to Time Machine via USB or FireWire local drive. (Optional)
Connect to ethernet (WiFi can be slow and spotty)
Boot to internet recovery and erase install

Before I load anything I repeat all!the tests with clean installs of only a few apps.
In your case, the battery is likely the biggest problem since all Apple devices with glued in batteries depend on a healthy battery for full performance. The AC power supply can’t provide burst current needed by the CPU and GPU so performance is lower without a healthy battery.
Next likely is the storage is failing or throwing errors. Macbook Pro incredibly slow/laggy