For me, while I was adding commonly used packages on my Raspberry Pi 3B+, Julia seemed to freeze and eventually the process was killed. It took me a while to figure out what was going on. I am running 64-bit Raspbian and was setting up Julia 1.7.2.
Another important item to consider: RPi’s are NOT good at remaining stable if their power source is not VERY stable. A bit of undervoltate and the RPi is down. If you’re married to the RPi, then a battery backup system (UPS) is an absolute must or you’re liable to lose some experimental data/money/time. Use the serial/USB interface to the UPS to monitor the health of the batteries and allow a graceful shutdown of equipment and experiment should the power go out.
Another, much simpler, solution finally came to mind. For your needs, an Arduino is dirt cheap, easy to program, and almost immune to the vagaries of our power sources. That said, if you want real fun while accomplishing your goal, look at micropython along with son- or grandson of Arduino, like an ESP32 board, or maybe a Teensy 3 or 4 board since they have gobs of memory and lots of room for everything. If you want to go all out, have the microcontroller log everything possible to a largish SD card and then use Sigrok/Pulseview to trace from the logs or even real-time all the events, in your choice of protocol.