You can add new troops in troops.txt, but it won't be save compatible. You also have to make sure they're placed before custom_n_recruit (kingdom_troops_end declared in module_constants), or else the game won't qualify them as "kingdom troops". One of the most obvious effects I noticed from this is that you can't talk to them the same way you talk to kingdom troops, and they may get weird/random dialogue options.
The module system is pretty easy to understand and get the hang of. There's more information in the
official module system documentation™.
The guards are declared in module_scripts. Searching for other instances of trp_custom_n_/trp_custom_r_/trp_custom_e_ stuff will show you other places that you have to replace with your new kingdom troops. You only need to change the version that you actually play. For example, if you only play Expanded and never really touch Native/Reworked, you don't need to edit the custom_n or custom_r stuff.
By default, except for guard troops and reinforcements, Floris sets up the custom troops to use the custom troops as player kingdom troops. There aren't a lot of places to edit, but it's a good idea to replace them all anyway.
You declare your reinforcements in module_party_templates (you can do this in Morgh's). And I think that's about it.