custom encryption is a big way to stop detection. A lot of people just use the public Xor... if you switched to a private, i'm sure it'd help with detection. Encrypt/Decrypt ALL YOUR TEXT STRINGS, that includes PTC's, Memory addies/bytes, menu strings, menu items, etc.
on top of that. packing your dll helps too.
Other methods would be to try n avoid hard coding classes. Try to get them virtually some how, the less addresses, the less the game notices changes.
Anything your putting on someones screen is gonna cause more RAM/VRAM use and that always means lag. the more fancy d3d, the more text strings, the more stuff you have will always affect something. You can't have 100 d3d squares and have it run the same as having 0