I'm working on MAX10.
I had a similar question for another FPGA type; (I use Cyclone V) In some docs I found that a NIOS II program can be used to update an external ROM to execute a firmware upgrade.
Mandatory is that you need to run NIOS II from RAM not from ROM: "Nios II Processor Application Copied from CFI Flash to RAM Using Boot Copier" in "https://www.intel.com/content/dam/www/programmable/us/en/pdfs/literature/ug/niosii_generic_booting_m...".
There is IP that enables programming of MAX10 UFM see " Intel MAX 10 UFM Implementation Guides" from " Intel MAX 10 UFM Implementation Guides".
I am in the process of trying some things out my self but I do believe that if you would be able to use your Nios II application to receive the HEX file over TCP/IP (for exemple) and then use it to program the UFM.