I don't think I want to think of the actual cost per pixel - especially the cost of my time! I have deliberately avoided accounting the final cost
Just googled and I found some on Shein with 200 cubes for £2.50. They also have 2cm sized ones at £1.31 for 20 cubes and 4cm ones for £1.88 for 4 cubes.
You'd still have to drill holes in them all, but I wonder if a different solution might be possible - for instance holes in the wooden strips between the rows of cubes that are slightly wider than screws that hold the cubes suspended from the strips. If they weren't too tight, the cube could rotate freely. But maybe just drilling holes using a CNC would easier (and potentially you could drill all the holes on a flat plane of wood before cutting up into cubes).