Post Injection (group settings) does that to some extend, but has a limit for the paragraphs.
Alternatively you could build your own counter into the single.php’s loop (or appropriate file) to achieve what you want.
Keep in mind that doing it this way you may re-use the same group over and over which can result in the same advert loading a bunch of times on that pageload.
Post Injection doesn’t have that problem, but as mentioned doesn’t look beyond 8 or so paragraphs.
Information, support and updates about plugins made and maintained by Arnan de Gans. Check out ajdg.solutions for more information.