Most 40 inch prints are viewed at sufficient distance that the tiny details are somewhat obscured, but I get the impression that you want these prints to stand close inspection. At 20X enlargement, the imperfections of film and lens resolution as well as diffraction begin to become apparent. If possible, going to a larger negative (4X5 or even 8X10) would give a substantial increase in quality even when using a more or less ordinary film like TMX. For example, if you are shooting at f/8, diffraction limits you to about 200 l/mm; a document film like CMS 20 will give you about 250 l/mm; and a good lens for a medium format camera will probably be about 120 l/mm (maybe a bit more). Combined, this yields a resolution of about 95 l/mm, which gives a print resolution of 120 l/in - a quite noticeable degradation at an arms length viewing distance. A decent 4X5 negative and lens with TMX will yield about 80 l/mm on the negative which equates to 203 l/in on the print - still a noticeable degradation, but a lot better. The results for an 8X10 would show no degradation.

Your current plan using MF and CMS 20 film will still probably work well. From the example you showed earlier, I don't think the defects in the enlarged image would be very obvious. Grain would be obvious, so your choice of film is important. But if the equipment is available, a larger negative would give better results.