Yes – I have used sodium hydroxide to dissolve an aluminium seatpost from a steel frame.
I removed all the components from the frame first, and poured sodium hydroxide solution in through the bottom bracket to fill the seattube/seatpost. I changed the solution once a day and it probably took 4-5 days in total. I needed to block the seatpost end of the seatube by wrapping a latex glove over it after the end of the seatpost dropped out as there was still more seatpost attached inside the frame.
Be very careful with the sodium hydroxide solution though – follow the instructions when mixing it (water first, then add sodium hydroxide I think). Also wear rubber gloves and don’t get it on your skin or in your eyes. Put a decent sized drip tray or washing up bowl underneath to catch any leaks/spillages. It is very nasty stuff so make sure pets/kids/family/wildlife can’t get at it – leave the bike frame with the solution in somewhere secure.
Bear in mind that the sodium hydroxide will also strip the paint. I ended up powder coating my frame afterwards!