بسم الله الرحمن الرحيم
The said piece of land which your family endowed for the mosque it became waqf and came out of your ownership. Another floor may be erected on this septic tank and salah may be offered on it but that part shall be deemed to be out of the mosque.
Allah knows Best!
Darul Uloom Deoband
This answer was collected from the official ifta website of Darul Uloom Deoband in India.