Welcome to Music.SE!
This is what we call an applied chord (some also call it a secondary chord). And your guess is exactly correct: this is a chord that functions to briefly make another chord sound like tonic.
This B°7 is the °7 chord built on the leading tone (scale-degree 7) of C major. Since this B°7 exists in C and not in F, playing it makes the music briefly sound like it's in the key of C. We call this act tonicization. You may have heard of modulation—a complete, lengthy move to another key—but a tonicization is a more brief move to another key. Think of modulation as jumping into the pool, but tonicization is just dipping your toe in. (See also What's the exact difference between modulation, key change and tonicisation?)
Since this B°7 chord is functioning to make C seem like a temporary tonic, we want to label the chord to show that function. As such, instead of labeling this ♭V°7, it's better understood as
vii°7/V, showing that it is the vii°7 chord of V (C) in the overall key of F.
As such, your entire progression is best understood as i–iv–vii°7/V–V7–i.
While this chord is called a secondary leading-tone chord, there are other types of secondary (or applied) chords. The secondary dominant is probably the most common, and that's where you use the temporary tonic's V(7). Trying replacing that B°7 with a G7 to hear what a V7/V sounds like!