Interesting idea. It is probably doable, but you would need a really large box (or multiple boxes) to fit all of the in-line modules. I presume you are wanting to use the fan's speed control module. I would check the continuity of the current speed control switch. I gather it isn't what you would normally expect.
Alternately. instead of using 3 in-line modules to control the different fan speeds, Dr. Ed. Chung has designed a
No-Hum Fan Speed Controller which you can build. In his project, he takes processes the output of a modified wall switch, but there is no reason you couldn't use an in-line dimmer.
Also, Lightolier makes a
3-Speed programmable Fan Control that is X10 compatible. At $95 it is kind of expensive, but it probably isn't that much more expensive than 3 in-line modules. It is a Decora wall switch, but you could probably stuff it in a box just as easily as 3 in-line modules.
I have often thought it would be nice if someone made a fan/light in-line module that would would control the fan and light independently (optimally with a 3-speed fan controller). If you think about it, much of the circuitry could be shared in the combined module.