As long as the app still works in older versions of MacOS, I think a virtual machine is a good solution. I have Mountain Lion and Sierra virtual machines running in Parallels on my 2018 (Intel) Mini that I use for old versions of very expensive software that I rarely need these days.
Problem is, it can be difficult setting up a MacOS virtual machine if you aren't into that kind of thing. I consider myself very experienced but it took multiple tries to get this working. Also note that I am using a Mac with an Intel CPU. On newer Apple Silicon Macs, this only works with relatively recent versions of MacOS VM's. You would need to use some kind of emulator for older versions of MacOS on these machines, not sure how well that would work (if at all).
But you haven't told us what kind of Mac you're using. Is it an Intel Mac capable of running an older version of MacOS that would support your app? If so, you could probably setup a dual-boot system. Or even simpler, just get an old Mac that is compatible, used Mini's can be very cheap these days. You could even set it up "headless" and access it with screen sharing on your newer Mac.