Yeah, the rstan problem is a different story and has a different cause I am afraid.
There are a few threads on discourse if you search for that error. For example Some models run without problems, but more complex give error: Error in unserialize(socklist[[n]]) : error reading/writing from connection - #9 by di4oi4
Hopefully those would help.
I have seen those errors reported a few times for rstan and Mac and I am afraid I dont have enough knowledge there to help.