The preliminary question here is what is the purpose of the figured bass.
Originally, it was a working tool understood (to greater or lesser extent) by every performer and composer, and the "rules" included a large component of common sense derived from the style of the music in question. If you try to codify the "rules" precisely, you soon discover that every different national style of music, and even every individual composer and copyist, had his own personal idiosyncrasies - and some of them were also very careless. There is rarely any guarantee that the figures in a manuscript or printed edition were either written or approved by the original composer.
However, if figured bass is now being used as a part of teaching common practice harmony (which is itself anachronistic, since baroque composers didn't write common practice harmony anyway!) then of course there must be some "well defined rules" to ensure that examination questions have "right" and "wrong" answers.
The issue as to whether accidentals only apply to the same octave is irrelevant, since the "rules" for accidentals in the period where figured bass was in common use were different in any case. Almost all modern "urtext" editions silently update this (and other things) to match modern conventions, and you will only see it in facsimiles of old editions and manuscripts.
But with all those caveats, each chord in figured bass is interpreted in isolation from the rest. Nobody in the baroque or early classical period would have ever imagined that the chord on the C in your example could be augmented (with a G sharp) unless that was explicit in the notation, and similarly a "chord" of E G# Bb on the penultimate note would have been just as nonsensical to them, unless it was made explicit. In both cases, the conventional preparation and resolution of such chords (in the voice leading) is contradictory to the surrounding figured bass notation.
There are occasions where cautionary accidentals are useful in figured bass, independent of any "rules" about normal accidentals applying at different octaves, and/or carrying over bar lines. A common example is in recitatives, where each phrase often starts with an abrupt key change, and it is common for a major chord to be followed by a minor chord on the same bass note, or in a different inversion (in the modern sense of that word).
In your example, if the E7 chord was immediately followed by an E minor chord, only an 18th-century optimist would have written E with no figures, and hoped the continuo player was literal-minded enough not to play another E major or E7 chord! A realist would have written E with a natural sign (with an implied "3", if no figure was written) to eliminate any doubt.
To sum up: the "rule" is that the figuring applies to each chord individually, but "cautionary" figuring, like cautionary accidentals, can be helpful to avoid the incorrect assumption that some notation was carelessly omitted.