One first step could be to start this in gdb and get a backtrace of the segfault (gdb -ex run --args python3 foo.py and when it says “segfault” do bt and capture the output).
This will at least show you which bits of C++ are involved.
Quite likely this is not lightning itself (which I think is pure Python) but rather that Lightning loads some auxiliary library which is (or libraries are mutually) incompatible.
Best regards
Thomas