Sharepoint - Modern UI Vs Classic UI Vs Power App, IS Classic UI still the most flexible way to customize SharePoint list forms?

If you truly want the most "flexible" way to customize list forms in SharePoint Online, you will want to create a custom SharePoint Framework (SPFx) WebPart, in which you could build an entirely custom JavaScript App, including your own entirely custom Form. Using this strategy, you will need to handle data saving/retrieving yourself through the Framework API. Once you choose a new page to host your webpart, you will want to ensure users use your newly developed page instead of the built-in Forms. Unfortunately, there is currently no way in the "Modern" experience to force users to use this new Form to replace the built-in list forms. You can use PowerShell to change the content type's EditFormUrl and NewFormUrl to point to your new page, but the List UI very rarely directs the user to those pages for input. The New button, for example on a list view, opens a modern form in a side-panel, that would not use your custom page. So, you probably only want to use this technique if your users do not do much interaction directly with the list.

Another Option, If you want something more similar to what you used to do with a ScriptEditor webpart in classic pages, you can build an SPFx Application Customizer Extension. The downsides to creating an SPFx Extention for this purposes, is that the Extension will be loaded on every page in your site, so you will need to wrap your code in a conditional to only perform your actions/validation when the expected list form elements are on the page.

Are either of these the the easiest way to customize a List Form? Absolutely not. A PowerApp would be much easier to build and maintain. But you specifically asked for the most "flexible", and if you truly need custom code to accomplish what you are doing, building SPFx Extenstions and/or SPFx Webparts will give you just that.

Also note that Remote Event Receivers are equally supported in both classic and modern lists, but developing WebHooks is the preferred approach to triggering custom code from SharePoint events -- and is a more widely supported standard.