Anyway, I have restored last night’s backup and downgraded back to 188.8.131.52 and everything is working again.
Has this been reported yet? If not I will try to reproduce the issue and get a Jira logged.
Edit: I should add, I did all the usual incantations, such as clearing app cache, deleting and rebuilding analytics tables, restarting everything, checking that the data elements were actually set to SUM aggregation, and praying to the DHIS2 gods.
There will be no more maintenance patched for 2.36, as it is now out of support, but this is quite an unfortunate regression, so we will try to get a new hotfix out to fix it as soon as possible (in the next days).