https://support.apple.com/en-us/HT202313
If you previously "purchased" Lion under your AppleID, you should be able to hold command-option-r at boot to get to Internet recovery. After startup with those keys held you will be asked to select your wifi, then you will be asked for your AppleID. After that you will see a spinning globe while the recovery utility downloads. Then you will see the recovery seen and from there you can use Disk Utility to format the drive to Mac OS Extended (Journaled) and install Lion.
After you get Lion in stalled you can use the App Store ti go back up to El Capitan if you want.