It's technically possible to upgrade the RAM and storage on an Apple M1 Mac mini — but there are several reasons why it's a terrible idea.
Even though the new Mac devices are less upgradable, swapping some of the components on the chip is still theoretically possible. That's evidenced by Chinese maintenance engineers who successfully expanded the RAM and SSD capacities on an Apple M1 chips.
Reportedly, the engineers completed the feat using a soldering station to install DRAM memory chips and NAND flash memory chips. While the process involved de-soldering the existing chips and adding the new components, it apparently didn't require any firmware modifications.
The exact details about the upgrade are scarce, but roughly translated Chinese text in the post touts the apparent success and claims that "victory belongs to those who adapt."
Of course, just because some engineers managed to pull it off doesn't mean you should try it at home.
For one, it's nearly impossible to purchase the DRAM and NAND chips you'd need for this procedure at the consumer level. You'll also need to shell out money for a soldering station. And, this all assumes that you or somebody you know has the skill to do it.
More importantly, any modifications of this nature will instantly void your warranty. That becomes more of a problem when you consider that de-soldering and soldering the DRAM and NAND chips requires a good amount of skill, precision, and patience.
Make any mistakes here and you'll end up with a dead Mac and no avenue for getting it fixed. Because of that, we'd caution against any sort of modification like this unless you're prepared to waste your money.
Because of the speed and performance benefits of the M1, it's much more advisable just to upgrade the RAM and SSD space at the time of purchase. It's an investment, and probably a wise one.