Good thinking. Don’t plant any tomatoes, peppers or potatoes there for a couple of years or so. Not sure what the bugs are. Colorado potato beetle comes to mind, but you should have seen some eggs on the underside of the leaves, and I’m not sure what the little devils look like.
The Colorado Potato beetle will leave a mass of tan /beige/ light brown eggs.