Trash compactors are simple devices with few components. With the advent of recycling they are out of fashion but you may get an occasional service call.
Compactors have up to four limit or safety switches.
1. A start switch operated by the user
2. A bin check switch ( sometimes two) that confirms that the drawer is closed all the way.
3. A complex top position switch that stops upward travel and reverses the drive motor.
If any one of these switches bad the unit will die. All can be checked with an ohmmeter.