OK, a couple of really helpful people (above all "Goup") on Discord helped me find the solution.
First things first, you can use the CopyAux node to visualise the auxiliary channels as colour channels, like so:
But that didn't quite give me what I wanted.
Another option was then to use the Bitmap node and activate the "Object ID" option, like so:
This was super close, but unfortunately I ended up with an unsightly aliased line where the ground meets the transparent BG.
I then noticed that deselecting "HiQ" in the Renderer 3D node's Anti-Aliasing/Per Channel Settings/Enable Anti-Aliasing settings did manage to get rid of the jaggedy line.
So this seems to do the job for now