If the script is too complex, you can try to simplify the it down by using OFS’s Simplify function.
Simple triangular waves shouldn’t feel too different between Wi-Fi and BLE. If that feels jittery you might want to look into your Bluetooth dongle.
And maybe check out the Open source Stroker Robot (OSR) by TempestMax. They are DIY units that runs completely locally via USB port (or via UDP and Bluetooth 5 with some modifications).
https://www.thingiverse.com/thing:4843410
They are currently working on the SSR1 which may stand as an alternative for the popular stroker.
https://discuss.eroscripts.com/t/ssr1-stroker-device-video/113511