What about Ambient Oclussion node with Inside feature enabled?
I'm not sure how precise result is, but seems to work much better than Mesh Analysis.
(Bar in screen is just a 2D gradient.)
Compare to Mesh Analysis, this shader:
- can be rendered (with Cycles engine)
- color is assigned to vertex (not a face)
Tips:
- To share same ColorRamp node in both material close this node into Node Group in one material and add this Node Group into second material.
- Color Management switch from Filmic to Standard
Note: Eevee with AO enabled produce colours, but there is not "Inside" feature we use for thickness.

Accuracy
quite interesting Q since a thickness depends on direction of meassure. Like plate of glass that we use to say and meassure a thickness in depth direction, that is thin. But you can also meassure thickness in width direction that would ve very thick in this case.
That is what Mesh Analysis measure. If you check @RobinBetts blend with OSL shaders, inside is one material called NormalDepth and that does exactly the same thing as Mesh Analysis - it shoots a single ray in face normal direction up to another face. This distance is represented by corresponding color assigned to a face. So if you open node group and check Map Range node - the first two values defines start / end of Color Ramp.
Example - From Min = 0 means red starts on distance zero and From Max = 1 means blue ends on distance 1 m. Playing with these two values you can exactly specify what distance ColorRamp represents. So this material seems to be the best for you.
But same as Mesh Analysis it generates "weird" colored faces that Are mathematically correct. Like when you check bottom part of Monkey's jaw, there is dark blue even that part of mesh is not such thick, but ray shooted from face goes all the way up to eyebrows, that make distance correspond to dark blue for that face.
There are other methods how to calculate thickness, where is not used a single ray direction. Like AO shooted many in hemisphere directions. Final colors represents average od these distances.
Comparison - Normal Depth (OSL)/ Ambient Occlusion / Lambert Depth (OSL)
Bar object is 1m high and 1m depth shaped as wedge object. Bar on the left uses Normal Depth shader and works just because distance is measured ONLY from one direction. Cube is 0.5 m so pure green in correct color for distance in a middle of bar. But as you can see other two shadery let you know that corners of Cube are thinner in 3d observation than Middle Mass of cube.

NormalDepth shader seems to be accurate ... with values of Ambient Occlusion and Lambert I had to play, to get similar colors. And I don't have a clue how to control.