Hello Nik,
thank you for your kind answer.
Probably my main mistake is that I am trying to determine the lens correction starting from images that were not taken for this purpose. I need to find a suitable subject and then try to apply the procedure you describe in the video tutorial.
About lens profiles, I am sure you have already considered using Lensfun library. Could it be an option?
Thanks a lot for your work!