This simple Aseprite script does basically this in one click:
If you create the 3x3 tileset on the left the script does the rest for you and gives you a 47 autotile sheet.
Get it from here: