The Optipac wont work for the LS-30 rotary sticks as its designed for optical devices like trackballs and spinners, it does mention rotary stick in the specs but its referring to optical rotary sticks and not mechanical ones like the LS-30.
Ultimarc did years ago make one that could plug 2 sticks in and when you rotate one of the sticks it sent a keyboard keypress, a different one depending on which direction you turned the joystick so you could map in mame to get the rotary effect working, doesnt look like they make one anymore, and barely seem able to find much info about it. Looks like they replaced it with a joystick upgrade option for their own joysticks they make.
There is this project to make one
https://www.pcbway.com/project/shareproject/MAME_Rotary_Joystick_to_USB.html and if you know much about Arduinos if you have one based on the 32U4 chipset you can configure it as a virtual USB keyboard and then wire the rotary mech pot to it to replicate what the Ultimarc version did of sending a keyboard command, not sure how the rotary pot works though so you would have to figure that out and work out a program that could tell which way it was turning.