There are a number of solutions, but I think it may actually be better to rephrase this one.
"As and whenever necessary, upon signing this document, the sublessees* waive expressly [any right to] an indemnity arising under any of the aforementionned headings."
"... or forgo expressly any claim for indemnity under..."
Might you not just be able to get away with the following?
"The sublessees hereby** waive expressly any right to to seek indemnity for the aforementionned expenses."
I'd not use "compensation" here. The purpose of this part of the document is to make it clear that if the lessees have work done to the property, it is to be at their own expense. They cannot say "hey, we've improved this. Cover it." Compensation is about seeking damages for loss. It is not the right term here.
In practical terms, if the s/lessees take it upon themselves to do work inside the place they are to rent, it is to be at their own expense. (The clause that follows often goes on to say that the lessor can require any such work to be "undone" and the property to be returned in its original state).
* I'd rename them here rather than using "they", as the subject is a long way back.
** "hereby" replaces all the stuff at the begining as it means as and when they sign. They might not.