Isn't the RAM inside the actual SoC with the Apple Silicon line? I haven't really opened any of 'em up.
As for older Macs - sure, I know someone who replaced 8 gigs with 16 on either an Air or Pro model that had 16 available as an option but was shipped with 8. It's just something you do when you have way too many Mac boards lying around at work and your bosses say you can't get a new work laptop.
Linux is a bit heavy for embedded stuff.
Intel's ME for an example, uses Minix.