I have a simpler suggestion: cinnamon. Ants hate it. I've used cinnamon successfully against ants many times. It takes a fairly large quantity and you have to leave it in place until they decide not to return. It should be placed along a line where they enter. They won't cross the line to "get to the other side." See
https://lasvegas.rentokil.com/blog/6...-get-rid-ants/ Mice aren't fond of cinnamon either.