Q:

What was the point of the Bank and the pink cockroaches?

In Logan Lucky I don't understand the point of

sending a cake with cockroaches to a Bank Manager, 
smashing her car, 
calling her before she eats her cake.

How does doing these things affect or influence robbing the NASCAR track? 
How is the woman related to any of the heist, so much so that she is given part of the money at the end?

A:

I can answer easily all your questions but not "the question": what was the point of the  "cockroach plot".

they only sent the cake, not a "cake with cockroaches"
2.they smashed her car to distract her out from the vault.
3.they did not call her. the security guys called her to inform her about the smashed car.

So the plot goes like this (the way makes sense to me):

For some reason they need to differentiate between the tubes,presumably to know which goes into the vault, to suck out the money on it later.
0:40:00 the Logan sister paints the cockroaches in different colours and puts them in different jars.
0:42:00 the money manager/clerk Gleema receives a cake.

Presumably she cannot leave the vault so she takes the cake into the vault.

few minutes later, BEFORE SHE CAN EAT HER CAKE, she is called out in the parking lot "someone hit and ran you ma'am"
crucially the security guards says: "we really need you to start filling out this forms", which takes a while.
after filling out the forms she wants to go back into the vault but it is closed automatically at 17:30 "ain't no arguin' with that automatic door".
Half of the cake is still inside: "I didn't get to finish my cake!"
0:44:30 That evening the idiot brothers put cockroaches painted in different colours in presumably different tubes (not clear if different tubes but that's the only way that makes sense to me).
0:46:00 The next morning Gleema enters the vault and discovers that her cake is full of cockroaches. They call the exterminators immediately without asking themselves: why are there pink cockroaches in the vault? The answer seems obvious, they entered the vault WITH the cake. 
the exterminators are the idiot brothers. Are they the only exterminators in town? Were the brothers already working with the only exterminator company that had contract with Nascar or whatever? You figure it out!
the reason the idiot brothers are there exterminating (besides making a living?) is to determine the colour of the cockroaches that got into the vault.
they call Jimmy on "like a real phone" and they say "we have a code pink", meaning that the pink cockroaches were the "winners". Jimmy tells his sister, who painted the cockroaches, "Mel, we have a code pink" and she geeks out for no reason, presumably she just plays silly.

So I think by stating the facts I have answered even the questions that you did not ask. If not, here is a summary: they needed the coloured CKs to find out which is "the pink tube". The cake had 3 purposes: 1.to lure the CKs 2. to create a false explanation about the existance of the CKs in the vault 3. and to facilitate the access of the idiot brothers into the vault, the only way to determine the colours of the "winner" CKs.
For me it is still a mistery: what was the purpose of the "pink tube"?
It was clearly stated: 00:20:55 "all the pipes run into the main vault"
it celarly shows in many sequences how all the pipes go into the same plexiglass money box. 
And it makes sense too: each pipe is connected to a different cashier but ,of course, all the money goes one way : into a single box in a vault. There they count it and put them in trucks, then transport them to the bank.
The only explanation I can figure:
One pipe does NOT go into the moneybox, it goes to or from the desk of the clerk in the vault to some other office and carries documents. 
So, the scope of the whole plot was to find out which is the single tube that did NOT go into the money pit. (Otherwise they would waste the explosive and/or precious time, maybe trigger some extra alarm?)
But the movie did a very bad job of explaining this and I would be very surprised if somebody could ever explain this to me.

