If the Zerg build you are talking about is the Stephano build, or at least close like it, then this answer should help.
What it is
The stephano build as it is called involves the Zerg player fast expanding to 3 bases total when your opponent sees you with a FFE. The object is to get a clear economic advantage over the protoss because it is said that zerg on the same number of bases as the protoss, will lose. Once the zerg reaches about 8 minutes he will have: 3 Bases fully saturated, roach speed reseraching, ling speed researching/done, +1 Range reseraching. By 11-13 minutes, he will have a maxed out 200/200 roach,ling army headed to your front door. He can constantly stream this in during the attack which makes it very effective.
This build is made for ZvP in which the Protoss is doing a Fast Expand build(generally either Forge Fast Expand or YufFE). It is designed to give the Zerg 3 bases very quickly and safely, while avoiding most Gateway timing attacks. -Liquipedia
How I've seen it stopped
I've been stopped as a Zerg player only a handful of times. This is NOT countered by air. Going for air will take time and my roaches will just kill your buildings before your voids could kill the first 10 roaches or lings. Good unit composition and sentries are the key to stopping this build. If you hold the roaches back with good sentry placement you can get almost free shots at roaches not in groups. You can divide the army and destroy it as it comes in while warping in more troops to deal with the threat. He will eventually have to transition if you come up with enough immortals and stalkers with zealots in the front. Since it is super hard to transition out of this build you will have a good window of time to come in and destroy with archons, zealots, immortals, stalkers, and sentries. He will only still have roach while he is trying to get an Brood Lord army. As for the spine crawlers, its not part of the build. He must have added that in but the basis is still the same, focus fire them quickly if you have a huge problem with that.
Sources
Liquidpedia
Day[9] Daily #472
I'm going through your replay as I type this, so I will mention things that I notice as I come up to them and pause the replay as time progresses. There will be a part where the game is technically over, but I will still analyze the decision making process as the game progresses, in case if the same scenario comes up again and it is still any ones game. If you need a practice partner: Dance.943
Step by step analysis
The first thing I noticed is you sent the scouting scv out even though you opened reaper first. This is not a bad idea, but it doesn't quite fit the opening you have going. An instance where you would want to send an scv around that time would be when you plan to go command center first and wish to e-bay block the protoss expansion. Instead you have the reaper coming out exactly 1 minute later, you are not going to gain any less scouting information from the reaper, and you are losing out on 40 minerals / minute with that scv not mining.
Now the reaper does come out and you notice your opponent is cannon rushing you. This is not a problem at all because cannons cannot move, and they are not in your main. There is no reason to pull scvs because the cannons are not a threat and you would only be losing out on mining time. Instead this should tell you that your opponent is weak at home because he invested 300 minerals at your natural, this will delay his cybernetics core which means no mothership core at home to defend against the reaper (plenty of worker kills for you). Keep your workers on gas and either a) Build a tech lab (marauders) or b) build a factory (tanks) to push back the cannon threat, and then build your command center in your main (expansions do not need to be in your natural until the threat is dealt with, produce scvs off both cc's and transfer when you have secured your natural)
When scouting with an scv, don't pull it back home so easily. You stopped his cannon threat, and then you placed an expansion. Had you kept your scv by your opponents base, you could have built an engineering bay to block his natural expansion.
At around 5:50 the protoss player will choose their tech path after fast expanding. You see his cannons so you know that his tech is delayed, and you saw the timing on his Nexus so you can assume that he is going to place his tech buildings around the 7 minute mark. That is around the time that you will want to start your factory, specifically because had your opponent gone robotics he could have placed the support bay around the 8-9 minute mark, and would have colossus around 12 minutes. Also because medivacs force the protoss player to tech to either blink, charge, colossus, pheonix, or storm. To counter the threat of the colossuss you would need the vikings or the ability to produce them as soon as you spot it.
At 9 minutes he attacks you with 4 stalkers. You should actually be the one attacking him, this is nearing the mid game mark where the protoss gateway army becomes obsolete without charge / blink. Your goal is to hit them right before they get their significant tech choice out.
At around 11:30 when you scanned your opponent, scan his main. Protoss rarely place their tech in their natural, and if you apply pressure with your army, you are going to see his natural anyway. Your goal is to see what tech path he is going, so that you can counter.
When you move your army out at 12 minutes. This position you are currently in (the aggressor), you should also be taking a third base. And have medivacs producing!
After you attacked his base, you saw he had a handful of stalkers. You might have been able to kill them all and take the nexus, I do not know for certain, but it would have been close. Another option would have been to run up his ramp. You killed his MSC so he cannot photon over charge the main, he has no zealots so his stalkers are too vulnerable, you would force his army to come to you while you snipe important tech structures or un-power buildings / supply block him. The possibilities are endless and in the end the choice you made was still a good choice, I like how your army is positioned at his third.
The engagement the second time... You scanned and see high templar, your first priority should be to avoid the incoming storms. You stim your units and attempt to catch your opponent off guard by focusing down his high templar. Good idea, bad outcome. Templar only have so much energy, and as you saw, even though you completely ate all of his storms, you still had an army left over capable of destroying his. Lesson: If you do engage in a scenario like this, rather than focusing down the high templar, instead split your units up so that they do not all get hit by the storm. In the end he will run out of energy, he will turn them into archons, and you will be in the exact same scenario with the exception that not all of your units will nearly dead. After that point, focus the pylon so he cannot warp in, it will buy you a little bit more time. If you do not think you can take out the pylon, back out.
at 17 minutes he attacks your 3rd. Your opponent's army is now located between yours, and a planetary fortress = A rock and a hard place. Best scenario here is to have your scv's repair the planetary and attack him from behind with your army. Attack click units will focus the closest threatening units, so if he were to engage your army from here, he would have to get out of range of the planetary or else some of his units would still be focusing it.
at 17:35~ you see his high templar, you only need to grab 2-3 marauders to attack them, not your entire army. That is what costed you that engagement
at 18:25, the micro actually hurt you. In this scenario because your opponent has only 3 zealots, it would be better to focus fire them and then re-stim and studder step into your opponents army. Stalkers are the 2nd worst cost efficient units in the game, the worst being the hellion without blue flame. If you see more zealots, then that is the queue to fall back to your army.
My reaction to your thoughts
You mentioned you think your two biggest mistakes are not denying his expansion and the engagement at the 12 minute mark. I am going to have to disagree with you. The engagement at 12 minutes was not one that put you behind in any means. Preventing someone from expanding is never something that could be considered a mistake because mistakes come from reacting, and preventing an expansion is not a reaction, it is a preemptive decision.
My thoughts on the two biggest mistakes
I think the two things that hurt you the most this game were not having medivacs out sooner, and the way you handled your army against high templar and psionic storm. If you treat high templars like banelings, I think the engagements would have been much more in your favor.
Best Answer
I took a look at the first half of the replay, since most of your questions were about the setup to that engagement. In summary, your opponent had more units because he had a stronger income, you made some micro mistakes during the fight, and you probably could've done a bit better at macro. As you mentioned, you didn't warp reinforcements in during the fight, even though you had resources and supply.
Economy
Red ended up with more resources invested into his army going into that first major encounter. The game totals up to 16:30 (when the battle starts) are 7600 for him and 5900 for you. You invested more into technology with your High Templar, which might have balanced it out, depending on how you used them (more on that later), but in terms of pure unit attack power, he had the advantage.
How did this happen?
Micro
Psionic Storm
Psionic Storm deals 80 damage over four seconds, if units stand in the storm for the full duration (they rarely do - you were getting about 2-3 seconds worth). That makes it good against lower HP units and not-so-great against higher HP units. Your best storms were against the lings and hydras, but the ones you dumped on the roaches weren't as effective because roaches have 145 HP.
Red probably knew this because right after he scouted your templar (at 16:00), he tripled his roach count - reinforcements that showed up at 17:15 in time to finish your army off. (Without those extra roaches, you might have even won.)
You can see the effectiveness of your storms against the hydras: the third, fourth, and fifth storms brought most of them really low into the red, but at that point your army was mostly gone and you didn't have much to finish them off. Another storm or two could've slaughtered at least half a dozen hydras.
Would Colossi have done better?
Maybe. The colossi could have certainly torn through those hydras as long as you kept his units at a distance and would generally be more effective than high templar against roaches. They're also a bit easier to micro in battle.
However, red scouted you just before he attacked, so he might've seen the colossi and retreated until he built up a counter unit. He had a spire built and the resources to switch to mutalisks or pick up some corruptors. If you saw his army there and attacked him with colossi around that 16 minute mark, you probably would have won that first encounter, and the rest of the game would be up to who responded better.