The purpose of a formaldehyde hardener is to create cross-linkages in the emulsion. These cross-linkages harden the gelatine and make it less soluble. Formaldehyde has the disadventage of being a gas and is released from aqueous solutions. A higher molecular weight aldehyde like glutaraldehyde or succinaldehyde could be substituted. These would remain the water solution. A 10% solution of glutaraldehyde is sold under the name Diswart and is used for wart removal. Commercially glutarladehyde is sold as a 50% solution.
There has been a concern about long term or chronic exposure to formaldehyde. Short term exposure is another matter. While it is irritating to mucous membranes and the eyes there appears to be no lasting effects from dilute solutions. It has been used in embalming solutions for more than a century. If it were as toxic as some would make it then morticians and medical students would never survive their exposure and live into old age.