you can make a creeper farm to automate gunpowder, that part is easy. the hard part is that sand isn't renewable. a lot of tech servers (scicraft being the biggest) just use tnt duping to do it until mojang makes sand renewable. i think that's the only "cheating" they do and it's kinda understandable cause otherwise it's impossible to get a lot of tnt.
If you've opened The End, there's a way to use the End Portal to duplicate sand. In one of my worlds, I have that feeding into a 32 furnace super smelter with a tree farm nearby for fuel (although I could build a carpet duper for that, actually.)
If you dupe carpet you can use it as fuel (3 carpets per smelt item) so it's quite inefficient. Still, as an unlimited item... As long you can supply the super smelter quick enough with fuel efficiency isn't that important.