This error has nothing to do with .htaccess , HTTP 429 is a sign of getting rate-limited by the server(Sending too many requests in a given amount of time).
I would highly recommend to use this line instead in that case:
RewriteCond %{HTTPS} !=on
I personally really dislike the port check because you’re relying on something unimportant like a port number while it’s perfectly fine to do HTTPS on a completely different port. The HTTPS variable is there to tell you whether the connection is using HTTPS, which is the thing you specifically want to know.
I’ll make sure to update the article soon to have a .htaccess snippet which works on both parameters.