I have recently had this problem. I installed the Ingo "Leon fix" board per,
https://pinside.com/pinball/forum/topic/tom-trunk-error-leons-fix-anyone-done-this/page/13#post-3708019
The description of how this board works seem to definitely address these trunk stops. You should also make sure the round opto interrupter is not slipping on the bottom of the mechanism.
Sadly, after a fair number of games, another stuck trunk! I actually just pulled my trunk gearbox apart and installed a replacement motor and gear and relubed the gearbox. Way back, someone mentioned the motor can wear out (not sure the actual mechanism here, increased resistance or something??) but the motor rotates to a dead spot and can't be electrically driven to keep turning. The load of the gear train probably makes this worse.
This cause seems a little strange because I think the symptom is pretty much the same for everyone - the trunk turns about 45 degrees (counterclockwise from the top) and then stops. It won't turn again during that game, but if you go into test, it will turn and may work for several games before having the issue again. It doesn't seem to stop rotating anywhere else. This implies the trunk rotation all the way through the gear train to the motor gear and motor position always wears and stops on this dead spot on every TOM ever made! Plus the motor has turned many times to get to this point given the gear ratios in the gearbox. Why didn't it stop earlier or later?? The board seems like the correct fix.
Anyway, so far it is working. The new motor is more snappy too. This is the motor: ebay.com link: itm
Good luck!