In this place I have no scripts. The Scrips panel folder is empty. I think that from Indesign 2022 they were already mislocated: they were not in Library/preferences but in Applications/Adobe Indesign 2022 /Scripts. For this reason perhaps they did not migrate...
Now, I am in Indesign 2023 and all my scripts are visible: Window/Utilities/Scripts/Community. All located in this Community folder (wrong place but it works)
My question is
a) should I remove them from the program folder and move them to the traditional Library/Preferences... etc. place?
b) And if this situation is tolerable although it has the problem that in upgrades they do not migrate.
Inside this folder you can create subfolders and they will also be visible in the scripts panel. For migration you can copy over your specific scripts into the corresponding folder of the new version. Another way is to keep your scripts in a folder outside InDesign installation and place a symbolic link to this folder inside the path given above. This way the only thing that needs to be copied over is the symbolic link and you also mitigate the risk of accidently losing your scripts due to botched installation/uninstallation
P.S. :- I gave a generic answer as I don't have CC2023 installed right away. But this should be relevant to that version as well
You are right that the scripts at the location /Applications/Adobe InDesign 2022/Scripts/Scripts Panel/ don't get migrated. I have not placed scripts in the other location you mentioned so if that works well for migration then we have a solution and keep using it. Otherwise I did suggest you another option of symbolic link which would require just an extra step of adding the symbolic link to the source folder in the new version of InDesign and you are also safe from any unwanted deletes etc.