The issue is that I want to use a wallet created with segwit/taproot compatible versions of bitcoind in the old version of clients.
All wallets created with new software are incompatible with older versions.
Bitcoin Core and most software isn't designed to be forward compatible, so what you want is impossible. Besides, i find it's ridiculous idea to use SegWit/Taproot wallet on client which doesn't implement SegWit/Taproot.
You could probably tweak the code a bit and compile it that it will open it, but you can't be sure that something else isn't going to cause an issue.
More recent Bitcoin Core switched from Berkeley DB 4.8 to SQLite as wallet.dat database, so simple tweak won't do the job.