Sorry, it is unclear as I wrote it in that post.
The rule applies to the 1:2 ratio, so you want to set the grinder so that you get for example 18g - > 36g in 36 seconds. That would be a starting point.
The 51ish grams output in 51 seconds would ask for a 25ish grams input (there's a 25g vst basket on the market).
What I do is that first I dial in the grinder for the above mentioned rule and then when making espresso, I cut the shot before I reach the 1:2 ratio. So, it is not a real ristretto but a shortened shot. From 15g input I want to get around 20g, from 18g I usually end the pump at around 25g output.
You can make a 51grams shot using the grinder settings described above (and you no longer look at time after 36 seconds just cut it by weight), but as you correctly pointed out, there will be unwanted stuff in the cup by that point. Basically, you can call it over extraction.