One alternative is splitting from your current commit that include the local commits you want to preserve:
git subtree split --prefix=dir1 HEAD
# Create a branch with the printed commit just to use it later
git branch split_dir_1 <split_commit>
And then do what was described it in the question you mentioned, delete the subdirectory and re-add the subtree.
git rm dir1
git commit
git subtree add --prefix=dir2 . split_commit
Bear in mind that by doing this you will still be able to see in the repository history when the first subtree was created and deleted and re-added.