Fortunately for you, most labor laws have a three-year limitation period for prosecution or civil action (though courts have the right to condone the delay, they are not likely to condone a delay of 22 years).
Compliance and Penalties
You need to start complying from the current period and then deal with the fallout when the authorities start asking questions. You need, however, to be ready for the penalty, interest, and back-payments.
Gratuity
If the employee has not claimed, you don't need to worry. But if they have claimed, you need to arrange for the money and pay it. And you need to take a Gratuity policy without further delay.
PF and ESIC Registration
For PF and ESIC, you need to register immediately. You may choose to fill the form in a manner as to minimize the impact, but here on the forum, we do not encourage falsification of records. Remember that you will have to answer queries from the department.
ESIC and PF Dues
ESIC may require you to pay the ESIC dues for three years if they discover that it was due. PF, I cannot commit as I don't know how they look at such violations.
Partnership Firm Liability
One big problem for you is that you are a partnership firm, so the partners are individually liable to pay the amount even if the firm does not have money.