What you're asking is very common, there are plenty of threads out there describing it. I do it myself, using a pressure canner.
As is noted, if you're going to store them at room temperature, it's critical that the wort be sterilized (not just "sanitized"). The only way to achieve that is by heating it to 253° F (i.e., 15 psi) for 20 minutes in a pressure canner.
I've read that some people prepare double-strength starter wort (1.080) and sterilize them in a pressure canner, then when they need a starter, the dilute the starter wort 50/50 with plain water to bring it down to 1.040 and reduce the amount of wort they have to can and store.
I would definitely NOT store excess mash wort in the fridge, regardless of how "sanitary" the process is. Unboiled wort directly from the mash is positively crawling with bacteria. The cold temperatures of a refrigerator will slow their progress, but not eliminate it entirely.
Either pressure can it, or freeze it.