There is a command line tool called
lha by Tsugio Okamoto that can encode and decode LHA archives.
The source code can be found, if links are followed at
https://lha.osdn.jp.
You might prefer simply to install
lha via homebrew formula
https://formulae.brew.sh/formula/lha (brew install lha)
This manpage was quite helpful for me to understand the command´s syntax:
https://www.mankier.com/1/lha
As a side note: with StuffIt Deluxe, I could manage to write LZH files and operate on LHA files generated by
lha and vice versa. However, if a symbolic link is stored inside a LHA or LZH file, StuffIt Deluxe and
lha seems to treat things different.
lha stores a symlink as a directory (lhd) while StuffIt Deluxe seems to take some different approach. At least in that scenario the tools are not interchangeable and are going to throw an error.
Thus, I've no idea, if
lha is absolutely conform to the standard that Amiga OS is expecting.
Maybe you could report back here, if
lha works for you.