Have you tried this trick to clear out dead NVRAM entries?
Defragging my old Dell's UEFI NVRAM
Yes and no.
I used sort of these tools to change a chipsetvariable in NVRAM, but that was reading/writing single stores according to GUID.
When I first recognized the problems with the old Samsung notebook I thought, it might be worth a try to start with an empty NVRAM. As I wrote earlier the NVRAM gets- in most cases- rebuilt automatically (but sometimes you can loose machine specific data).
Intel Flash Programming tool (fpt- coresponding to Intel ME version) reads and writes if there are no protections installed. It's a rather stupid program, it doesn't check anything, it just follows either firmware region or adresses in commandline.
I flashed the marked EFI volume (with the both NVRAM volumes) over with the empty EFI volume from the stock bios region update (0x730000 to 0x760000 in firmware, 0x230000 to 0x260000 in bios region).
EDIT But if I understand correctly your main interest would be to 'compact' the NVRAM to save some space and make secure boot operations 'safer'?
I don't think that would work generally. NVRAM was mainly unprotected in these years, the Dell from the linked post was probably Sandy Bridge, so NVRAM was unprotected. I assume / hope, it'd be protected better.
Bios vendors protect their NVRAM now better because of security and stability. On the other hand there are still references to basic operations for newer machines, for example
HPE ProLiant Gen11 servers. It's unclear for me how far you could reach into a NVRAM, and if all variables were allowed to be rewritten (they shouldn't).
And you're still relying on the implemented firmware mechanisms, for example for systems with two alternating store you'd have access only to what the firmware would consider the active store (which in hardware might change while rewriting).
Maybe I can try later today (or in the next days) to try this for the old Samsung, and dump the firmware before and after to see what really happened...
But did you ever get a confirmation that a non working / bricking cert update really was NVRAM space related?