It is possible, yes, not sure though if there is already an OSP-Script around from which you can take inspiration for that. At game_start you have this section here
Code:
# Troops:
# Assign banners and renown.
Starting with
Code:
(try_for_range, ":kingdom_hero", active_npcs_begin, active_npcs_end),
the banners are getting assigned to the lords via the operation (troop_set_slot, ":kingdom_hero", slot_troop_banner_scene_prop, ":banner_id"),
This is basically the operation which you need to reuse for the same slots to reassign the lords a new banner of the respective faction. Be aware however that in theory a faction could have more lords than it has factions available, in Native there is one big texture sheet with 18 (?) banners per faction iirc. You would need to find a workaround here or have enough placeholder banners for each faction at hand.