It is not a feature for the .htaccess file. The .htaccess file is read by the web server.
The feature to tell Joomla to set a different generator meta tag already exists and you already found it.
Setting the generator to NULL IS NOT ALLOWED; IT IS A BUG WHICH WILL BREAK JOOMLA UNDER NEWER PHP 8 VERSIONS. Ever since Joomla 1.7.0 the setGenerator argument is documented as a string (not string|null). Likewise, the internal _generator property and the getGenerator method of the same \Joomla\CMS\Document\Document class are documented as string. Joomla 5 will increase the minimum PHP version to 8.1 which means that the properties in these objects will eventually become typed and have the correct visibility, i.e. protected string $_generator instead of public $_generator. The methods will also get scalar type hints so it will be public function setGenerator(string $generator): void instead of public function setGenerator($generator). Care to guess what idiotically doing ->setGenerator(null) does? Yeah, it makes Joomla fail with an ErrorException. So of course we are NOT going to do that.
Joomla requires a generator tag. For the reason please refer to \Joomla\CMS\Document\Document::getMetaData.
The correct way to address it is by setting a fake / nondescript generator tag using the feature we already provide. Removing it doesn't protect you any more than using a fake one. The whole point is whether your CMS type can be found from a simple Google search.
Nicholas K. Dionysopoulos
Lead Developer and Director
🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!