Hello again. 
So, I just tested this on an old source build, and it seemed to work well on the surface level, but I haven’t had the time to dig properly into it. However, to my understanding, this idea shouldn’t be a problem. Just know that I haven’t fully tested this (I’m not in a position to do so) and can’t fully vouch for it working perfectly, but I see no reason why it should cause a problem.
I think you can delete your /UnrealEngine/.git/
folder. This is created by Git when you source the engine, and unless you plan on upgrading the engine in-place (which I’ve never done, and I’m not sure is even possible), I think this folder is unnecessary. For me, it takes up about 50 GB of space, so if it can be deleted, it’ll be a decent chunk taken out.
(Note: The /.git/
folder is hidden in Windows. You’ll need to show hidden items to see it.)
To my understanding, the only thing that uses this folder is Git, not Unreal directly. That’s why I say it should be safe, because if you don’t plan on updating or anything (again, if that’s even possible), then I imagine the /.git/
folder is mostly if not entirely unnecessary for the engine. Please, someone correct me if I’m wrong, because I don’t have an absolute, rock-solid foundation on this.
Like I said, I just tested this on an old source build, and everything seemed to work fine, but I didn’t dig too much into it past “the engine launches”. Worst case scenario, something gets broken and if you don’t know how to fix it, you’ll have to re-download the engine (but that’s the case with everything you do working with this engine). The only thing I’d suggest to make this easier is rename the folder, open the engine or project using the engine, and explore. It’ll act like you deleted it without actually deleting it. If everything looks good and gets your seal of approval, then delete it. If not, set the name back, and pray it didn’t permanently damage something (it shouldn’t).
So, proceed at your own risk. I’ve never heard of someone trying to “trim” the engine before, so this is new terrain for me (and intriguing). But, modifying this engine can be like playing with fire at times. I’m just making sure you understand the weight of what you’re trying (I’m not advocating against it, I’ve modified the engine myself. You just need to know the risks).
As for Lyra, I am of no help. I toyed with Lyra when it first came out, but I’ve learned a lot since then and haven’t really touched it since, so I can’t really help you out there. I’d suggest making a new topic on it though, because I know a lot of people have really dissected Lyra, and a topic “Reducing the size of Unreal 5.5.4 Source build” isn’t going to attract them to your problem. 
Let me know if you try it and how it goes!
EDITS: Grammar