When a ROM is compiled, the compiler follows the build file, which means it’ll build in dependencies related to the files bing compiled. So simply remove/replace has a high risk of not working, since dependencies are unique to each file/component.
I was reading on xda-forums someone said they rooted, installed stock android, then lsposed, and microG, and found the end result to be very pleasing
This is a bit messy - rooting is done to a running OS, and unrelated to flashing a stock ROM. Stock Roms, as far as I’ve seen typically have Google Services baked in. Just clarifying.
I suppose they flashed a ROM without Google Services, rooted it, then flashed the Magisk Module Lsposed, and a version of GApps. I’ve done similar, lsposed (and its predecessor XPosed) provides a lot of customization capability.
Running without Google Services makes a fast phone and a battery that lasts noticeably longer. You could try simply freezing the Google Services files with something like 3C Toolbox (once rooted, of course). I think 3C can actually uninstall the files, but that’s a good path to boot loop (ask me how I know 😁 ).
Even just freezing the files will often cause repetitive error notifications.
These problems are (I think) a result of the dependencies - like broadcasts that get configured for services during compile.