According to my current understanding, asicboost optimizes mining through forming a merkle root of special kind. That sounds like it should be implemented in software? Does hardware need to be designed in special way to take advantage of optimized merkle roots? If so, can such special hardware be used to mine regular, unoptimized blocks?
It requires both hard- and software support. The software needs to feed the hardware with different first half headers for which the same second half of the header can be used. The hardware must be designed to make use of the fact the second half of the header is used with different first halfs and leave out some calculations. If I understand the antminer design correctly, their hardware can turn off the circuit that recomputes the very first step of the second header. This saves some energy, but not make it faster.
it should apply the same way to GPUs, FPGAs or CPU miners. However, I think it is more useful if you have several THash/s.
I guess, that since they need a special merkle root, it may happen, that an empty or almost-empty block provides a necessary merkle root, so they just keep mining such an empty block until it is mined or an optimized merkle root found for a filled block, whichever happens first?
Empty blocks can have several different reasons. They may indicate asicboost (which may add an additional delay for computing colliding hashes), but it can also be a slow block verifier, or the network has high delays, or just an inefficient design of the pool.
I think you can compute collisions for an empty blocks in advance before the previous block was found (is there any reason why not?). So while you search for Merkle Tree collisions, you can still use the precomputed collisions to mine empty blocks with Asicboost. But this all is pure speculation on my part.
You can make them completely invisible. Randomize the payout address, swap transactions that are exactly at the same fee level, insert your own transactions that you send to the network to hide the fact that it is an artficial transaction, etc.
You only publish the block if you have a solution, the colliding Merkle Roots are never published (they cannot be used for other blocks).
But you can't hide using asicboost from someone who has access to the hardware or the communications between server and hardware, so it is possible to verify whether the antminer you have in your home uses Asicboost.