How to disable high contrast text when that option isn't available? I bought a new phone and the settings from my old phone were transferred during the initial setup.

One setting was "High contrast text" within Accessibility settings. I would like to deactivate this option. The reason I don't like it is that astronomy programs with a "night mode" (red on black) settings display black text with a white outline, and the white outline destroys my night -adapted vision.

My new phone, a Realme 5 - running Android 9 with the custom layer "Color OS 6" - doesn't have the high contrast text option available in its settings. Apparently the next version of Color OS does have this setting, but it's not yet available for my device in my country.

Things I have tried:


I have tried using restore factory settings to only restore system settings, but that didn't affect the high contrast text setting.
I have tried running getprop | grep text and looking to see if there's anything relevant, but there isn't. 
I have tried deactivating the option on my previous phone, manually triggering a cloud backup, then using Activity Launcher to launch CloudRestoreFlowActivity, but it doesn't open.


The only related question I can find is this one but it applies to Android 5, and it's protected and I'm unable to add an answer.
(I'm asking this question to self-answer, because I've just solved the problem myself and couldn't find any valid solutions elsewhere: everything assumes that this option is available in settings but it isn't on my device)
I finally found the solution. A computer with ADB is required. Attempting to do this from a local terminal will fail with a permissions error: "Failed calling service settings: Failed transaction (2147483646)"

Prerequisites:


ADB enabled in developer tools.
The last option in developer tools, "Disable permission monitoring" I believe it's
called (on my Spanish phone it's "Desactivar supervisión de
permisos"), enabled. If not then the command will fail with the message


  Security exception: Permission denial: writing to settings requires:android.permission.WRITE_SECURE_SETTINGS



Then, with the phone connected to the computer, simply execute:

adb shell settings put secure high_text_contrast_enabled 0

Thanks to:


ADB+Accessibility
I can't enable WRITE_SECURE_SETTINGS for an app over ADB