Hi Ilia!
While in theory everything you suggest may be possible, in practice we strongly recommend users of Elk Audio OS to use it by writing plugins for Sushi. That takes away most of the complexity, and gives you a lot of the groundwork done by us for you.
In theory, sure, you can write a replacement for Sushi, interfacing with the audio device using our Raspa subsystem, but there’s little to gain for that, and a lot of duplicate work that we have already done.
Using ALSA and JACK audio directly is not supported on Elk. It most certainly is possible to use those on the RPi4 for example, but then you have no reason to use Elk Audio OS specifically.
I would therefore recommend that you still make a plugin (e.g. VST3) for Sushi, and just like any other MIDI controlled synthesizer plugin for example, you will that way benefit a lot from the low output latency our platform enables.
For that scenario, we have extensive documentation and examples, which you most easily get into by working your way through our documentation, ideally from the beginning if you’re not familiar with audio programming: https://elk-audio.github.io/elk-docs/html/index.html
Examples and more are available here: https://github.com/elk-audio/elk-examples
And here, we maintain a collection of already cross-compiled open-source plugins we have tested on Elk Audio OS: https://github.com/elk-community
Edit: since you mention you are not familiar with audio development, may I also recommend that you approach your task in step-wise increments? First make a VST3 plugin which works on e.g. Ubuntu desktop, for example using the JUCE framework, and then, with that done, tackle the next step of making the same plugin work on Elk Audio OS.
Hope this answers your questions!
Best,
Ilias of Elk