Allow login by username or email on checkout login form

To answer my own question, this is possible using the email registration module.

install dev version
apply patch from here
go to /admin/config/people/accounts and check the checkbox: Allow log in with email address or username.
go to /admin/commerce/config/checkout-flows and replace the default login with the login provided by this module
Optionally, the patch from this issue will allow for the username to be entered on registration.