How long is this gonna be up and running? Cases may not be needed. If you're optimizing for cheap; then perhaps motherbaords and CPUs of a couple generations back are a better bet. "Refurb" deals can save a lot of money there.
Of course "cheap" can cost too much: if you need reliability and want it to run first time after assembly, then it might pay to spend more.
I aim mainly for perf/cost and the cost is the TOC - this includes power consumption which currently is a big part of the cost in the long run. So I would aim for lower TDP under load - these newer Ryzen's seem to have 2x lower TDP than quite less performant older solutions.
Of course "cheap" can cost too much: if you need reliability and want it to run first time after assembly, then it might pay to spend more.