If what Martin suggested somehow doesn't fit the bill

It doesn't, because it deals with advising `select-window` while the main issue here is that I resize windows in the `window-size-change-functions` hook (albeit using a guard to avoid infinite recursion) and I can't come up any workarounds for that.

On 2 May 2018 at 17:06, Eli Zaretskii <eliz@gnu.org> wrote:
> From: Andrea Cardaci <cyrus.and@gmail.com>
> Date: Wed, 2 May 2018 15:27:12 +0200
> Cc: bug-gnu-emacs@gnu.org, Noam Postavsky <npostavs@gmail.com>,
>       martin rudalics <rudalics@gmx.at>, 31312@debbugs.gnu.org
>
> Any advice on this part? I needed to force the size of windows and hooking `select-window` (via `advice-add`)
> is apparently not enough to catch all the cases.
>
> Is there a better way to achieve what I want?

If what Martin suggested somehow doesn't fit the bill, and no other
ideas are brought up, then I prefer to discuss new features or
infrastructure to satisfy similar needs, rather than force
applications to use such fragile techniques.  E.g., we could provide
some customizable controls in the code that resizes windows when
needed.