Ditto B Smith and Greg.
There are also a set of socket for banana plugs. These may have been used to a multi meter. A test stand is most likely use.
The reversing circuit and speed controls could have been used to Run-in a new, HO locomotive.
HO trains are recommended to be "Run-In" before being placed in service on your railroad. Running the engine for a period of time would seat the brushes to the proper contour of the motor commutator. The run-in would also distribute the grease in the gearing after sitting in a box on a store shelf. Both of these fixes would make for better and more reliable slow speed operation.
This rig could have allowed an engine to be run-in without being on display on a layout (a museum for example).