Welcome to the world of fruit-bearing bonsai. Wood borers are an extremely common pest for crabapple, apple, cherry and other fruit trees used for bonsai. Apple bonsai are magnets for a whole army of pests. Borers are among those that can cause extreme harm, even kill them. I used to have a really great apple bonsai. Got rid of it after years of tiring pest prevention, including hoards of borers every spring and summer.
The insects are larval worms that mature into moths and beetles--there are several species. I'd bet yours is a flathead borer. They chew there way into a tree's interior wood to keep away from predators. They carve tunnel paths up to the cambium from the inside, to eat the cambium. That can sometimes girdle the tree from the inside, or kill off entire sections of the trunk.
Getting rid of them usually involves going after them physically, either by trying to skewer them with wire shoved into the holes, or (more likely) breaking the hole open and pulling them out --holes typically have sharp bends that can prevent wire from getting far enough into the hole to reach the bug. I had some success in soaking cotton in insecticide and stuffing pieces far up into the holes. It can work, but for the most part, the borers just tunnel away. That "success" is temporary though. Once you have one, typically others show up.
The insect larva have a crawling stage just after they hatch out on the surface of the tree. That is the only phase where spraying insecticide can get them. That phase for you has passed (and FWIW, the crawling phase only lasts a few days and it's virtually impossible to catch them at that point)
entomology.ca.uky.edu