I used AppleScript for the first two years of this app as well (Can't believe it's been 7 years since I started it). But it's hard to handle complex programs, and handing off data to Swift or Objective-C from AppleScript. So I switched to [ScriptingBridge](https://developer.apple.com/documentation/scriptingbridge). It provides better Objective-C APIs to handle Apple Events.
I have published an app [Exporter](https://apps.apple.com/us/app/exporter/id1099120373?mt=12) that does something similar - exports Apple Notes to HTML and markdown with the attachments. Give it a try, let me know if it solves your issue.
Also, why did you select JSON as the output format?
+1 to a vacation. And after that rather than going after what's in demand/hype right now, go after something that you want to use and isn't available in the market, and try to build that. I have found building tools for myself that I and a bunch of other people love to use as one of the most rewarding/fulfilling work.
Not a technical skill, but in the self improvement genre - Colin Murray’s channel https://m.youtube.com/@colinmurrayYT/videos is great for people who like exercising from home, without investing a lot in equipments and weight. Has helped me exercise more regularly compared to past years.
I remember seeing it years ago, still amazed by it. What's even cooler is that it was created almost 10 years ago and I believe it hasn't changed much since then. You can read about it [here](https://acko.net/blog/zero-to-sixty-in-one-second/)