It gets very messy because of how the upgrade system is built.
Note below that I am using terms "Unit Design" and "Trained Unit" as different things. A Unit Design exists in your unit design window, but it is not an actual unit under your command. A Trained Unit is when you select a Unit Design to train and, upon completion, becomes something you can move around on the map.
How to Automatically Upgrade Unit Designs: Create a Unit Design where you select the "Upgrade" option for a Weapon or Armor slot. For example, you can select Upgrade on your 1-hand Blunt Attack category. This Unit Design will always have the latest available 1-hand Blunt Attack weapon, and is updated automatically. So whenever you use this Unit Design to make a Trained Unit, that Trained Unit will come out as having the latest weapon. Because of this two Trained Units from the same Unit Design can have different weapons depending on what was available when they were trained.
How to Upgrade Trained Units: Make a Unit Design where you select the Upgrade option for a slot. Make a Trained Unit out of this Unit Design. Then, when you have a new item unlocked from research, select your Trained Unit and go to its action menus in the lower left part of the screen. You should see "Upgrade Armor" or "Upgrade Weapon". If they are not immediately visible, click the little arrow icons pointing upwards to view all available actions.
Therefore, unless your Trained Unit comes from an Automatically Upgrading Unit Design, you will not be able to upgrade the gear your Trained Unit wears.